diff options
Diffstat (limited to 'testsuite')
| -rw-r--r-- | testsuite/compiler/renamer/funpatt.gf | 14 | ||||
| -rw-r--r-- | testsuite/compiler/renamer/funpatt.gfs | 1 | ||||
| -rw-r--r-- | testsuite/compiler/renamer/funpatt.gfs.gold | 7 | ||||
| -rw-r--r-- | testsuite/compiler/renamer/varpatt.gf | 13 | ||||
| -rw-r--r-- | testsuite/compiler/renamer/varpatt.gfs | 4 | ||||
| -rw-r--r-- | testsuite/compiler/renamer/varpatt.gfs.gold | 4 |
6 files changed, 43 insertions, 0 deletions
diff --git a/testsuite/compiler/renamer/funpatt.gf b/testsuite/compiler/renamer/funpatt.gf new file mode 100644 index 000000000..8406e1e3b --- /dev/null +++ b/testsuite/compiler/renamer/funpatt.gf @@ -0,0 +1,14 @@ +abstract funpatt = {
+
+-- this should raise error
+-- we cannot pattern match on functions
+
+cat D ;
+fun D1 : D ;
+ D2 : D ;
+
+fun d : D -> Int ;
+def d D1 = 1 ;
+ d D2 = 2 ;
+
+}
\ No newline at end of file diff --git a/testsuite/compiler/renamer/funpatt.gfs b/testsuite/compiler/renamer/funpatt.gfs new file mode 100644 index 000000000..c7692083e --- /dev/null +++ b/testsuite/compiler/renamer/funpatt.gfs @@ -0,0 +1 @@ +i -src testsuite/compiler/renamer/funpatt.gf
diff --git a/testsuite/compiler/renamer/funpatt.gfs.gold b/testsuite/compiler/renamer/funpatt.gfs.gold new file mode 100644 index 000000000..b64278900 --- /dev/null +++ b/testsuite/compiler/renamer/funpatt.gfs.gold @@ -0,0 +1,7 @@ +
+
+data constructor expected but funpatt.D1 is found instead
+OCCURRED IN
+renaming definition of d in funpatt.gf, line 12
+OCCURRED IN
+renaming module funpatt
diff --git a/testsuite/compiler/renamer/varpatt.gf b/testsuite/compiler/renamer/varpatt.gf new file mode 100644 index 000000000..93bddd63e --- /dev/null +++ b/testsuite/compiler/renamer/varpatt.gf @@ -0,0 +1,13 @@ +abstract varpatt = {
+
+-- this should raise error
+-- we cannot pattern match on functions
+
+cat D ;
+fun D1 : D ;
+ D2 : D ;
+
+fun d : D -> Int ;
+def d x = 1 ;
+
+}
\ No newline at end of file diff --git a/testsuite/compiler/renamer/varpatt.gfs b/testsuite/compiler/renamer/varpatt.gfs new file mode 100644 index 000000000..f3422103e --- /dev/null +++ b/testsuite/compiler/renamer/varpatt.gfs @@ -0,0 +1,4 @@ +i -src testsuite/compiler/renamer/varpatt.gf
+
+pt -compute d D1
+pt -compute d D2
diff --git a/testsuite/compiler/renamer/varpatt.gfs.gold b/testsuite/compiler/renamer/varpatt.gfs.gold new file mode 100644 index 000000000..8d4409e5d --- /dev/null +++ b/testsuite/compiler/renamer/varpatt.gfs.gold @@ -0,0 +1,4 @@ +1
+
+1
+
|
