Skip to content

Commit 4c6d9f9

Browse files
Update context.tl
1 parent fad20c2 commit 4c6d9f9

1 file changed

Lines changed: 1 addition & 18 deletions

File tree

teal/check/context.tl

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2362,24 +2362,7 @@ end
23622362

23632363
function Context:infer_lambda_parameters(node: Node, expected: FunctionType)
23642364
-- safety first
2365-
if not expected then
2366-
return
2367-
end
2368-
2369-
-- normalize expected type safely
2370-
expected = self:to_structural(expected)
2371-
2372-
-- unwrap PolyType (common in Teal)
2373-
if expected is PolyType then
2374-
expected = expected.types[1]
2375-
end
2376-
2377-
-- must be function after normalization
2378-
if not (expected is FunctionType) then
2379-
return
2380-
end
2381-
2382-
if expected.typename ~= "function" then
2365+
if not expected or expected.typename ~= "function" then
23832366
return
23842367
end
23852368

0 commit comments

Comments
 (0)