forked from GitHub/gf-core
Adding test case for interaction between record subtyping and record extension
This commit is contained in:
12
testsuite/compiler/compute/Records.gf
Normal file
12
testsuite/compiler/compute/Records.gf
Normal file
@@ -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"};
|
||||
}
|
||||
2
testsuite/compiler/compute/Records.gfs
Normal file
2
testsuite/compiler/compute/Records.gfs
Normal file
@@ -0,0 +1,2 @@
|
||||
i -retain testsuite/compiler/compute/Records.gf
|
||||
cc hello
|
||||
1
testsuite/compiler/compute/Records.gfs.gold
Normal file
1
testsuite/compiler/compute/Records.gfs.gold
Normal file
@@ -0,0 +1 @@
|
||||
"hello"
|
||||
Reference in New Issue
Block a user