Source file src/internal/types/testdata/check/doubled_labels.go

     1  // Copyright 2014 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  func _() {
     8  outer:
     9  inner:
    10  	for {
    11  		continue inner
    12  		break inner
    13  	}
    14  	goto outer
    15  }
    16  
    17  func _() {
    18  outer:
    19  inner:
    20  	for {
    21  		continue inner
    22  		continue outer /* ERROR "invalid continue label outer" */
    23  		break outer    /* ERROR "invalid break label outer" */
    24  	}
    25  	goto outer
    26  }
    27  

View as plain text