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