aboutsummaryrefslogtreecommitdiff
path: root/tests/vars.ek
blob: ad562132739c26cd60270975d0af99e9cbb83430 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
typedef any {}

struct some_struct {
	i64 a;
}

struct some_template (any A) {
	A a;
}

main()
{
	i64 a = 20;
	a = 200;

	some_struct b = {.a = 20};
	b = {.a = 200};

	mut c = {.a = 20} as some_struct;
	c = {.a = 200};

	mut some_template d = {.a = 20};
	d = {.a = 200};

	mut some_template![i64] e = {.a = 20};
	e = {.a = 200};

	mut f = {.a = 20} as some_template;
	f = {.a = 200};

	mut g = {.a = 20} as some_template(i64);
	g = {.a = 200};
}