SimType[et] = et
}
- Types[TANY] = newType(TANY)
+ Types[TANY] = newType(TANY) // note: an old placeholder type, NOT the new builtin 'any' alias for interface{}
Types[TINTER] = NewInterface(LocalPkg, nil, false)
CheckSize(Types[TINTER])
// int32 Hence, (bytetype|runtype).Sym.isAlias() is false.
// TODO(gri) Should we get rid of this special case (at the cost
// of less informative error messages involving bytes and runes)?
+ // NOTE(rsc): No, the error message quality is important.
// (Alternatively, we could introduce an OTALIAS node representing
// type aliases, albeit at the cost of having to deal with it everywhere).
ByteType = defBasic(TUINT8, BuiltinPkg, "byte")
// any type (interface)
DeferCheckSize()
AnyType = defBasic(TFORW, BuiltinPkg, "any")
- AnyType.SetUnderlying(NewInterface(NoPkg, []*Field{}, false))
+ AnyType.SetUnderlying(NewInterface(BuiltinPkg, []*Field{}, false))
ResumeCheckSize()
if base.Flag.G == 0 {
ComparableType.Sym().Def = nil
- AnyType.Sym().Def = nil
}
Types[TUNSAFEPTR] = defBasic(TUNSAFEPTR, UnsafePkg, "Pointer")