CL 364377 emitted definition of 'any' when compiling runtime. But 'any'
is only available when generic enabled. Thus emitting its definition
unconditionally causes the compiler crashes.
Updates #49619
Change-Id: I0888ca1cbc7a7df300310a99a344f170636333f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/364614
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
}
writeType(types.NewPtr(types.Types[types.TSTRING]))
writeType(types.NewPtr(types.Types[types.TUNSAFEPTR]))
- writeType(types.AnyType)
+ if base.Flag.G > 0 {
+ writeType(types.AnyType)
+ }
// emit type structs for error and func(error) string.
// The latter is the type of an auto-generated wrapper.
-// build
+// build -gcflags=-G=3
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style