Fixed a bug in the type system with consecutive calls
This commit is contained in:
parent
66b409bbd4
commit
885d6e3ea8
|
@ -671,7 +671,9 @@ proc inferType(self: Compiler, node: Expression): Type =
|
|||
of lambdaExpr:
|
||||
result = self.inferType(LambdaExpr(node.callee).returnType)
|
||||
of callExpr:
|
||||
result = self.inferType(CallExpr(node.callee).callee)
|
||||
result = self.inferType(CallExpr(node.callee))
|
||||
if not result.isNil():
|
||||
result = result.returnType
|
||||
else:
|
||||
discard # Unreachable
|
||||
of varExpr:
|
||||
|
|
Loading…
Reference in New Issue