Skip to content

Commit

Permalink
add another test for inference failure case
Browse files Browse the repository at this point in the history
  • Loading branch information
byorgey committed Oct 12, 2024
1 parent 517f62f commit ff44367
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/unit/TestLanguagePipeline.hs
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,12 @@ testLanguagePipeline =
"\\x:Int. x.y"
"1:9: Type mismatch:\n From context, expected `x` to have a record type,\n but it actually has type `Int`"
)
, testCase
"inference failure with record projection"
( process
"\\x. x.y"
"1:5: In the record projection `x.y`, can't infer whether the LHS has a record type. Try adding a type annotation."
)
, testCase
"infer record projection with tydef"
(valid "tydef R = [x:Int] end; def f : R -> Int = \\r. r.x end")
Expand Down

0 comments on commit ff44367

Please sign in to comment.