diff options
| author | krasimir <krasimir@chalmers.se> | 2010-01-31 22:16:35 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2010-01-31 22:16:35 +0000 |
| commit | 2d3de22b17db0482d242ace8f18f97547dd27c8c (patch) | |
| tree | 4771405eb1e19cc73a3a9af38f060d972808e000 /testsuite | |
| parent | 3be9ce32407f18c99dcf18010d320ac485bf38f9 (diff) | |
added test cases for polymorphic and record types in the abstract syntax
Diffstat (limited to 'testsuite')
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
|
