]> Cypherpunks.ru repositories - gostls13.git/commit
[dev.regabi] go/types: type alias decl requires go1.9
authorRob Findley <rfindley@google.com>
Thu, 11 Feb 2021 15:45:49 +0000 (10:45 -0500)
committerRobert Findley <rfindley@google.com>
Tue, 16 Feb 2021 21:01:14 +0000 (21:01 +0000)
commit7696c9433406c3f5b9f127cb557120b74e3c3952
tree41d63998c29cea17a68dbd960eb218dc3d1bc65c
parentc2358a1ae77d7bd09fb8b728d25641b5757a7a58
[dev.regabi] go/types: type alias decl requires go1.9

This is a port of CL 289570 to go/types. It has some notable differences
with that CL:
 + A new _BadDecl error code is added, to indicate declarations with bad
   syntax.
 + declInfo is updated hold not an 'alias' bool, but an aliasPos
   token.Pos to identify the location of the type aliasing '=' token.
   This allows for error messages to be accurately placed on the '='

For #31793

Change-Id: Ib15969f9cd5be30228b7a4c6406f978d6fc58018
Reviewed-on: https://go-review.googlesource.com/c/go/+/291318
Trust: Robert Findley <rfindley@google.com>
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/go/types/decl.go
src/go/types/errorcodes.go
src/go/types/resolver.go
src/go/types/testdata/go1_8.src [new file with mode: 0644]