forked from GitHub/gf-core
testcase for parameters with nested records
This commit is contained in:
7
testsuite/compiler/params/params.gf
Normal file
7
testsuite/compiler/params/params.gf
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
abstract params = {
|
||||||
|
|
||||||
|
cat S; NP ;
|
||||||
|
|
||||||
|
fun test : NP -> S ;
|
||||||
|
|
||||||
|
}
|
||||||
1
testsuite/compiler/params/params.gfs
Normal file
1
testsuite/compiler/params/params.gfs
Normal file
@@ -0,0 +1 @@
|
|||||||
|
i testsuite\compiler\params\paramsCnc.gf
|
||||||
20
testsuite/compiler/params/paramsCnc.gf
Normal file
20
testsuite/compiler/params/paramsCnc.gf
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
concrete paramsCnc of params = {
|
||||||
|
|
||||||
|
param
|
||||||
|
Number = Sg | Pl ;
|
||||||
|
Person = P1 | P2 | P3 ;
|
||||||
|
|
||||||
|
oper
|
||||||
|
Agr = {n : Number; p : Person} ;
|
||||||
|
|
||||||
|
param
|
||||||
|
Case = Nom | Acc | Abess Agr ;
|
||||||
|
|
||||||
|
lincat
|
||||||
|
S = {s : Str} ;
|
||||||
|
NP = {s : Case => Str} ;
|
||||||
|
|
||||||
|
lin
|
||||||
|
test np = {s = np.s ! Abess {n=Sg;p=P3}} ;
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user