mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-21 09:02:50 -06:00
added test cases for polymorphic and record types in the abstract syntax
This commit is contained in:
5
testsuite/compiler/typecheck/abstract/PolyTypes.gf
Normal file
5
testsuite/compiler/typecheck/abstract/PolyTypes.gf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
abstract PolyTypes = {
|
||||||
|
|
||||||
|
fun f : (A : Type) -> A ;
|
||||||
|
|
||||||
|
}
|
||||||
5
testsuite/compiler/typecheck/abstract/RecTypes.gf
Normal file
5
testsuite/compiler/typecheck/abstract/RecTypes.gf
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
abstract RecTypes = {
|
||||||
|
|
||||||
|
fun f : {s:Int} -> Int ;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
i -src testsuite/compiler/typecheck/abstract/PolyTypes.gf
|
||||||
|
i -src testsuite/compiler/typecheck/abstract/RecTypes.gf
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
checking module PolyTypes
|
||||||
|
|
||||||
|
The term Type
|
||||||
|
|
||||||
|
is not allowed in the abstract syntax
|
||||||
|
|
||||||
|
in type of function f in PolyTypes.gf, line 3
|
||||||
|
|
||||||
Reference in New Issue
Block a user