Home | History | Annotate | Download | only in issue15838.dir
      1 // Copyright 2016 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 a
      6 
      7 func F1() {
      8 L:
      9 	goto L
     10 }
     11 
     12 func F2() {
     13 L:
     14 	for {
     15 		break L
     16 	}
     17 }
     18 
     19 func F3() {
     20 L:
     21 	for {
     22 		continue L
     23 	}
     24 }
     25 
     26 func F4() {
     27 	switch {
     28 	case true:
     29 		fallthrough
     30 	default:
     31 	}
     32 }
     33 
     34 type T struct{}
     35 
     36 func (T) M1() {
     37 L:
     38 	goto L
     39 }
     40 
     41 func (T) M2() {
     42 L:
     43 	for {
     44 		break L
     45 	}
     46 }
     47 
     48 func (T) M3() {
     49 L:
     50 	for {
     51 		continue L
     52 	}
     53 }
     54 
     55 func (T) M4() {
     56 	switch {
     57 	case true:
     58 		fallthrough
     59 	default:
     60 	}
     61 }
     62