summaryrefslogtreecommitdiffstats
path: root/llgo/test/llgoi/maps.test
blob: 8678104d3e80b4bcc46ce22266db30120913b67e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// RUN: llgoi < %s | FileCheck %s

m := make(map[int]int)
// CHECK: m map[int]int = map[]

m[0]
// CHECK: #0 int = 0

_, _ := m[0]
// CHECK: #0 int = 0
// CHECK: #1 bool = false

func() {
	m[0] = 1
}()

m[0]
// CHECK: #0 int = 1

_, _ := m[0]
// CHECK: #0 int = 1
// CHECK: #1 bool = true
OpenPOWER on IntegriCloud