Skip to content

Commit b8ac61e

Browse files
go/internal/gccgoimporter: recognize "any" as a builtin type
In CL 536715 we're changing the gofrontend export data to report "any" as a builtin type. This permits us to distinguish the builtin type from some other package-level type "any". That requires an update to this code. Change-Id: I91d75a056a155fa9892c4b25ab396cb4d39cc8e4 Reviewed-on: https://go-review.googlesource.com/c/go/+/537195 Reviewed-by: Than McIntosh <[email protected]> Reviewed-by: David Chase <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
1 parent 9819d82 commit b8ac61e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/go/internal/gccgoimporter/parser.go

+2
Original file line numberDiff line numberDiff line change
@@ -902,6 +902,7 @@ const (
902902
gccgoBuiltinERROR = 19
903903
gccgoBuiltinBYTE = 20
904904
gccgoBuiltinRUNE = 21
905+
gccgoBuiltinANY = 22
905906
)
906907

907908
func lookupBuiltinType(typ int) types.Type {
@@ -926,6 +927,7 @@ func lookupBuiltinType(typ int) types.Type {
926927
gccgoBuiltinERROR: types.Universe.Lookup("error").Type(),
927928
gccgoBuiltinBYTE: types.Universe.Lookup("byte").Type(),
928929
gccgoBuiltinRUNE: types.Universe.Lookup("rune").Type(),
930+
gccgoBuiltinANY: types.Universe.Lookup("any").Type(),
929931
}[typ]
930932
}
931933

0 commit comments

Comments
 (0)