mirror of
https://github.com/golang/go
synced 2024-11-24 09:40:08 -07:00
9799622f09
Towards better syntax error messages: With this change, the parser knows whether a semicolon was an actual ';' in the source, or whether it was an automatically inserted semicolon as result of a '\n' or EOF. Using this information in error messages makes them more understandable. For #17328. Change-Id: I8cd9accee8681b62569d0ecef922d38682b401eb Reviewed-on: https://go-review.googlesource.com/36636 Reviewed-by: Matthew Dempsky <mdempsky@google.com>
11 lines
307 B
Go
11 lines
307 B
Go
// errorcheck
|
|
|
|
// Copyright 2010 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package main
|
|
|
|
type T1 // ERROR "unexpected newline in type declaration"
|
|
|
|
type T2 /* // ERROR "unexpected EOF in type declaration" */ |