Added test for alias types
This commit is contained in:
parent
02dd7fa124
commit
d3fea3aad3
1 changed files with 22 additions and 0 deletions
22
test/good/type_alias.ept
Normal file
22
test/good/type_alias.ept
Normal file
|
@ -0,0 +1,22 @@
|
|||
const n:int = 10
|
||||
|
||||
type metres = int
|
||||
type tableau = int^n
|
||||
type matrice = metres^n^n
|
||||
|
||||
fun f(a:metres) returns (o: metres)
|
||||
let
|
||||
o = a + 1;
|
||||
tel
|
||||
|
||||
fun g(a:tableau) returns (o:tableau)
|
||||
let
|
||||
o = map f <<n>>(a);
|
||||
tel
|
||||
|
||||
fun h(a:matrice) returns (o:matrice)
|
||||
var x : matrice;
|
||||
let
|
||||
x = a;
|
||||
o = map g <<n>>(x);
|
||||
tel
|
Loading…
Reference in a new issue