test/fixedbugs/issue29218.go
raw| 1 | // compile |
| 2 | |
| 3 | // Copyright 2019 The Go Authors. All rights reserved. |
| 4 | // Use of this source code is governed by a BSD-style |
| 5 | // license that can be found in the LICENSE file. |
| 6 | |
| 7 | package p |
| 8 | |
| 9 | type T struct { |
| 10 | b bool |
| 11 | string |
| 12 | } |
| 13 | |
| 14 | func f() { |
| 15 | var b bool |
| 16 | var t T |
| 17 | for { |
| 18 | switch &t.b { |
| 19 | case &b: |
| 20 | if b { |
| 21 | } |
| 22 | } |
| 23 | } |
| 24 | } |