From b625b416ee78aab67173e485373dabfb14385e79 Mon Sep 17 00:00:00 2001 From: krasimir Date: Sun, 31 Jan 2010 22:16:35 +0000 Subject: [PATCH] added test cases for polymorphic and record types in the abstract syntax --- testsuite/compiler/typecheck/abstract/PolyTypes.gf | 5 +++++ testsuite/compiler/typecheck/abstract/RecTypes.gf | 5 +++++ .../typecheck/abstract/non-abstract-terms.gfs | 2 ++ .../typecheck/abstract/non-abstract-terms.gfs.gold | 12 ++++++++++++ 4 files changed, 24 insertions(+) create mode 100644 testsuite/compiler/typecheck/abstract/PolyTypes.gf create mode 100644 testsuite/compiler/typecheck/abstract/RecTypes.gf create mode 100644 testsuite/compiler/typecheck/abstract/non-abstract-terms.gfs create mode 100644 testsuite/compiler/typecheck/abstract/non-abstract-terms.gfs.gold 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