Closed DiThi closed 3 months ago
The underlying cause is the same for both examples: semInferredLambda
doesn't wrap the lambda expression in a wrapper error when the body has an error, leading to the body ultimately ends up in transf
.
I've found another crash that seems related to this one (but it may be an issue on its own).
proc getf(f: proc(x: int): int) = discard
getf proc(x: auto): auto = foo
It's a different error unless I do something about the second auto
, e.g.
proc getf(f: proc(x: int): int) = discard
getf proc(x: auto): int = foo
where it gets the same error as in the first post.
The underlying cause is the same (i.e., semInferredLambda
not handling nkError
correctly).
Example 1:
Example 2:
The first example produces:
and the second example does the same except with
nkError 389709