summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2010-01-31 22:16:35 +0000
committerkrasimir <krasimir@chalmers.se>2010-01-31 22:16:35 +0000
commit2d3de22b17db0482d242ace8f18f97547dd27c8c (patch)
tree4771405eb1e19cc73a3a9af38f060d972808e000
parent3be9ce32407f18c99dcf18010d320ac485bf38f9 (diff)
added test cases for polymorphic and record types in the abstract syntax
-rw-r--r--testsuite/compiler/typecheck/abstract/PolyTypes.gf5
-rw-r--r--testsuite/compiler/typecheck/abstract/RecTypes.gf5
-rw-r--r--testsuite/compiler/typecheck/abstract/non-abstract-terms.gfs2
-rw-r--r--testsuite/compiler/typecheck/abstract/non-abstract-terms.gfs.gold12
4 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/compiler/typecheck/abstract/PolyTypes.gf b/testsuite/compiler/typecheck/abstract/PolyTypes.gf
new file mode 100644
index 000000000..66c19e835
--- /dev/null
+++ b/testsuite/compiler/typecheck/abstract/PolyTypes.gf
@@ -0,0 +1,5 @@
+abstract PolyTypes = {
+
+fun f : (A : Type) -> A ;
+
+} \ No newline at end of file
diff --git a/testsuite/compiler/typecheck/abstract/RecTypes.gf b/testsuite/compiler/typecheck/abstract/RecTypes.gf
new file mode 100644
index 000000000..6e8946fe1
--- /dev/null
+++ b/testsuite/compiler/typecheck/abstract/RecTypes.gf
@@ -0,0 +1,5 @@
+abstract RecTypes = {
+
+fun f : {s:Int} -> Int ;
+
+} \ No newline at end of file
diff --git a/testsuite/compiler/typecheck/abstract/non-abstract-terms.gfs b/testsuite/compiler/typecheck/abstract/non-abstract-terms.gfs
new file mode 100644
index 000000000..0b07b7ed4
--- /dev/null
+++ b/testsuite/compiler/typecheck/abstract/non-abstract-terms.gfs
@@ -0,0 +1,2 @@
+i -src testsuite/compiler/typecheck/abstract/PolyTypes.gf
+i -src testsuite/compiler/typecheck/abstract/RecTypes.gf \ No newline at end of file
diff --git a/testsuite/compiler/typecheck/abstract/non-abstract-terms.gfs.gold b/testsuite/compiler/typecheck/abstract/non-abstract-terms.gfs.gold
new file mode 100644
index 000000000..c7d1b8335
--- /dev/null
+++ b/testsuite/compiler/typecheck/abstract/non-abstract-terms.gfs.gold
@@ -0,0 +1,12 @@
+
+
+checking module PolyTypes
+ The term Type
+ is not allowed in the abstract syntax
+ in type of function f in PolyTypes.gf, line 3
+
+
+checking module RecTypes
+ The term {s : Int}
+ is not allowed in the abstract syntax
+ in type of function f in RecTypes.gf, line 3