Source file src/internal/types/testdata/fixedbugs/issue59371.go
1 // Copyright 2023 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package p 6 7 var m map[int]int 8 9 func _() { 10 _, ok /* ERROR "undefined: ok" */ = m[0] // must not crash 11 } 12 13 func _() { 14 var ok = undef /* ERROR "undefined: undef" */ 15 x, ok := m[0] // must not crash 16 _, _ = x, ok 17 } 18