about summary refs log tree commit diff
path: root/boot/tests/lower/structural_dedup.cskt
blob: ee4bcd3680f31266a29ff5e0e51bde2093e8b64e (plain)
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
two functions taking the same anonymous tuple type produce just
one synthesized type entry.

<<<

f = fun (a (int, int)) int { return 0 }
g = fun (b (int, int)) int { return 0 }

>>>

(unit
	(types
		(type 0 int primitive)
		(type 1 uint primitive)
		(type 2 bool primitive)
		(type 3 string primitive)
		(type 4 float primitive)
		(type 5 byte primitive)
		(type 6 ascii primitive)
		(type 7 void primitive)
		(type 8 __cat_type_0 synthetic structure (field _0 (ref int)) (field _1 (ref int)) (depends_on 0 0)))
	(functions
		(function 0 f (returns (ref int)) (param a (ref __cat_type_0)) (block
			(return (expr 0))
		))
		(function 1 g (returns (ref int)) (param b (ref __cat_type_0)) (block
			(return (expr 0))
		)))
	(emission_order 0 1 2 3 4 5 6 7 8))