~mna/snow

snow/pkg/codegen/testdata/struct_select.snow.want -rw-r--r-- 281 bytes
424066c5Martin Angers doc: v0.0.5 1 year, 7 months ago
                                                                                
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
package main

import "fmt"

type _اS struct {
	_اx int
}

func _اSاnew(
	s _اS,
	m map[string]bool,
) _اS {
	var r _اS
	if m["x"] {
		r._اx = s._اx
	}
	return r
}

func _اprintln(
	x int,
) {
	fmt.Println(x)
}

func main() {
	var s _اS
	s._اx = 3
	_اprintln(s._اx)
}