Skip to content

Commit 17eee31

Browse files
committed
go/types: enable disabled test for comma-ok expressions
This was fixed long ago but the test was not enabled. For #8189. Change-Id: Ia44ef752b6bf076f3e243d2d0db326a392a20193 Reviewed-on: https://go-review.googlesource.com/27310 Run-TryBot: Robert Griesemer <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 6937167 commit 17eee31

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/go/types/api_test.go

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -171,13 +171,11 @@ func TestTypesInfo(t *testing.T) {
171171
`x.(int)`,
172172
`(int, bool)`,
173173
},
174-
// TODO(gri): uncomment if we accept issue 8189.
175-
// {`package p2; type mybool bool; var m map[string]complex128; var b mybool; func _() { _, b = m["foo"] }`,
176-
// `m["foo"]`,
177-
// `(complex128, p2.mybool)`,
178-
// },
179-
// TODO(gri): remove if we accept issue 8189.
180-
{`package p2; var m map[string]complex128; var b bool; func _() { _, b = m["foo"] }`,
174+
{`package p2a; type mybool bool; var m map[string]complex128; var b mybool; func _() { _, b = m["foo"] }`,
175+
`m["foo"]`,
176+
`(complex128, p2a.mybool)`,
177+
},
178+
{`package p2b; var m map[string]complex128; var b bool; func _() { _, b = m["foo"] }`,
181179
`m["foo"]`,
182180
`(complex128, bool)`,
183181
},

0 commit comments

Comments
 (0)