From ff4436734bc70ffbe065660217b1fbdf3e869911 Mon Sep 17 00:00:00 2001 From: Brent Yorgey Date: Sat, 12 Oct 2024 11:51:18 -0500 Subject: [PATCH] add another test for inference failure case --- test/unit/TestLanguagePipeline.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/unit/TestLanguagePipeline.hs b/test/unit/TestLanguagePipeline.hs index 4e8e68dff..1bb61d388 100644 --- a/test/unit/TestLanguagePipeline.hs +++ b/test/unit/TestLanguagePipeline.hs @@ -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")