Source file test/fixedbugs/issue32133.go

     1  // errorcheck
     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  // errors for the //line-adjusted code below
    10  // ERROR "newline in string"
    11  // ERROR "newline in character literal|newline in rune literal"
    12  // ERROR "newline in string"
    13  // ERROR "string not terminated"
    14  
    15  //line :10:1
    16  import "foo
    17  
    18  //line :19:1
    19  func _() {
    20  	0x // ERROR "hexadecimal literal has no digits"
    21  }
    22  
    23  func _() {
    24  	0x1.0 // ERROR "hexadecimal mantissa requires a 'p' exponent"
    25  }
    26  
    27  func _() {
    28  	0_i // ERROR "'_' must separate successive digits"
    29  }
    30  
    31  func _() {
    32  //line :11:1
    33  	'
    34  }
    35  
    36  func _() {
    37  //line :12:1
    38  	"
    39  }
    40  
    41  func _() {
    42  //line :13:1
    43  	`

View as plain text