From 129d914002384bcf871ce63ec47ac92b4c714255 Mon Sep 17 00:00:00 2001 From: krasimir Date: Fri, 13 Nov 2009 10:28:37 +0000 Subject: [PATCH] add test case for typechecking of lincat --- testsuite/compiler/check/lincat-types/Test.gf | 5 +++++ testsuite/compiler/check/lincat-types/TestCnc.gf | 5 +++++ testsuite/compiler/check/lincat-types/test.gfs | 1 + testsuite/compiler/check/lincat-types/test.gfs.gold | 7 +++++++ 4 files changed, 18 insertions(+) create mode 100644 testsuite/compiler/check/lincat-types/Test.gf create mode 100644 testsuite/compiler/check/lincat-types/TestCnc.gf create mode 100644 testsuite/compiler/check/lincat-types/test.gfs create mode 100644 testsuite/compiler/check/lincat-types/test.gfs.gold diff --git a/testsuite/compiler/check/lincat-types/Test.gf b/testsuite/compiler/check/lincat-types/Test.gf new file mode 100644 index 000000000..f78e5a6b3 --- /dev/null +++ b/testsuite/compiler/check/lincat-types/Test.gf @@ -0,0 +1,5 @@ +abstract Test = { + +cat S; + +} \ No newline at end of file diff --git a/testsuite/compiler/check/lincat-types/TestCnc.gf b/testsuite/compiler/check/lincat-types/TestCnc.gf new file mode 100644 index 000000000..3c67fd710 --- /dev/null +++ b/testsuite/compiler/check/lincat-types/TestCnc.gf @@ -0,0 +1,5 @@ +concrete TestCnc of Test = open Predef in { + +lincat S = PTrue ; + +} \ No newline at end of file diff --git a/testsuite/compiler/check/lincat-types/test.gfs b/testsuite/compiler/check/lincat-types/test.gfs new file mode 100644 index 000000000..8c79f22f3 --- /dev/null +++ b/testsuite/compiler/check/lincat-types/test.gfs @@ -0,0 +1 @@ +i -src testsuite/compiler/check/lincat-types/TestCnc.gf \ No newline at end of file diff --git a/testsuite/compiler/check/lincat-types/test.gfs.gold b/testsuite/compiler/check/lincat-types/test.gfs.gold new file mode 100644 index 000000000..9f19766e5 --- /dev/null +++ b/testsuite/compiler/check/lincat-types/test.gfs.gold @@ -0,0 +1,7 @@ + + +checking module TestCnc + Happened in linearization type of S in TestCnc.gf, line 3: + type of PTrue + expected: Type + inferred: PBool