Adding test case for interaction between record subtyping and record extension

This commit is contained in:
hallgren
2011-09-19 12:43:14 +00:00
parent 1de43118f9
commit a4ca3ac81d
3 changed files with 15 additions and 0 deletions

View 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"};
}

View File

@@ -0,0 +1,2 @@
i -retain testsuite/compiler/compute/Records.gf
cc hello

View File

@@ -0,0 +1 @@
"hello"