~mna/snow

snow/pkg/codegen/testdata/struct_simple_generic.snow.want -rw-r--r-- 348 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
package main

import "fmt"

type _اAا0 struct {
	_اx int
}

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

func main() {
	var a _اAا0 = _اAا0اnew(_اAا0{_اx: 1}, map[string]bool{"x": true})
	_اprintln(a._اx)
}

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