aboutsummaryrefslogtreecommitdiff
path: root/tools/odinfmt/tests/comp_lit.odin
blob: 0b7e5684d15a8e4fc90bdbeb82a9d0981929b1aa (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
30
31
32
package odinfmt_test 


main :: proc() {
	T :: struct {
		a, b, c, d: int,
	}
	_ = T{0,0,0,0}


	_ = T{a=0,b=0,c=0,d=0}

	_ = T{
		a=0,b=0,
		c=0,d=0,
	}

	sort.sort(sort.Interface{len = proc(it: sort.Interface) -> int {
		c := 2
		}, 
		less = proc(it: sort.Interface, i, j: int) -> bool {
			b := 1
		}, 
		swap = proc(it: sort.Interface, i, j: int) {
			a := 2
			c := 3
		}, 
		collection = &polygon,
	})
}