test/fixedbugs/issue49145.go
raw| 1 | // run |
| 2 | |
| 3 | // Copyright 2021 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 main |
| 8 | |
| 9 | func f(j int) { |
| 10 | loop: |
| 11 | switch j { |
| 12 | case 1: |
| 13 | break loop |
| 14 | default: |
| 15 | println(j) |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | func main() { |
| 20 | loop: |
| 21 | for j := 0; j < 5; j++ { |
| 22 | f(j) |
| 23 | if j == 3 { |
| 24 | break loop |
| 25 | } |
| 26 | } |
| 27 | } |