diff options
Diffstat (limited to 'libgo/go/go/types/conversions.go')
-rw-r--r-- | libgo/go/go/types/conversions.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libgo/go/go/types/conversions.go b/libgo/go/go/types/conversions.go index f98cc8d81a..2bf1e2d5e3 100644 --- a/libgo/go/go/types/conversions.go +++ b/libgo/go/go/types/conversions.go @@ -55,7 +55,7 @@ func (check *Checker) conversion(x *operand, T Type) { // not []byte as type for the constant "foo"). // - Keep untyped nil for untyped nil arguments. if IsInterface(T) || constArg && !isConstType(T) { - final = defaultType(x.typ) + final = Default(x.typ) } check.updateExprType(x.expr, final, true) } @@ -69,18 +69,19 @@ func (x *operand) convertibleTo(conf *Config, T Type) bool { return true } - // "x's type and T have identical underlying types" + // "x's type and T have identical underlying types if tags are ignored" V := x.typ Vu := V.Underlying() Tu := T.Underlying() - if Identical(Vu, Tu) { + if IdenticalIgnoreTags(Vu, Tu) { return true } - // "x's type and T are unnamed pointer types and their pointer base types have identical underlying types" + // "x's type and T are unnamed pointer types and their pointer base types + // have identical underlying types if tags are ignored" if V, ok := V.(*Pointer); ok { if T, ok := T.(*Pointer); ok { - if Identical(V.base.Underlying(), T.base.Underlying()) { + if IdenticalIgnoreTags(V.base.Underlying(), T.base.Underlying()) { return true } } |