diff options
| author | hallgren <hallgren@chalmers.se> | 2011-09-19 12:43:14 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2011-09-19 12:43:14 +0000 |
| commit | c8c81f77f7fa0e905f22143ef61412d856f7847d (patch) | |
| tree | 58296541d07ec6d1eb5382391e0d2af63051d28c /testsuite/compiler | |
| parent | 128cd2f5c0d8d7f43819f33164c3b7472778eece (diff) | |
Adding test case for interaction between record subtyping and record extension
Diffstat (limited to 'testsuite/compiler')
| -rw-r--r-- | testsuite/compiler/compute/Records.gf | 12 | ||||
| -rw-r--r-- | testsuite/compiler/compute/Records.gfs | 2 | ||||
| -rw-r--r-- | testsuite/compiler/compute/Records.gfs.gold | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/compiler/compute/Records.gf b/testsuite/compiler/compute/Records.gf new file mode 100644 index 000000000..29207787b --- /dev/null +++ b/testsuite/compiler/compute/Records.gf @@ -0,0 +1,12 @@ +resource Records = { + +param P = A; + +oper + hello = id "hello"; + -- Id should be an identity function for Str +--id : Str -> Str = \ s -> s ; + id : Str -> Str = \ s -> ({a=s}**f r).a; + f : { b:Str } -> { b:Str } = \ x -> x; + r : { a:P; b:Str} = {a=A;b="b"}; +} diff --git a/testsuite/compiler/compute/Records.gfs b/testsuite/compiler/compute/Records.gfs new file mode 100644 index 000000000..7d74a70a3 --- /dev/null +++ b/testsuite/compiler/compute/Records.gfs @@ -0,0 +1,2 @@ +i -retain testsuite/compiler/compute/Records.gf +cc hello diff --git a/testsuite/compiler/compute/Records.gfs.gold b/testsuite/compiler/compute/Records.gfs.gold new file mode 100644 index 000000000..3580093b9 --- /dev/null +++ b/testsuite/compiler/compute/Records.gfs.gold @@ -0,0 +1 @@ +"hello" |
