aboutsummaryrefslogtreecommitdiff
path: root/tests/struct_generic_cont/struct_generic_cont.ek
blob: 34c604b8229a7c509e50f670b7993a7661a2eb5e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
define any[] {}
typedef ptr {}
typedef i27 {}

typedef struct[any T] {
	T a;
}

continue struct[any T] {
	do_something(*struct![T] self => T){
		return self*.a;
	}
}

main()
{
	mut p = struct![i27]{.a = 1};
	p.do_something();
}