]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/go/types/lookup.go
go/types, types2: introduce _Alias type node
[gostls13.git] / src / go / types / lookup.go
index 4fcae994f906339c2d230a00c6dc0875a18f042f..e6ad72843743ab2a856006e36bedf34904cb1fbf 100644 (file)
@@ -529,7 +529,7 @@ func (check *Checker) newAssertableTo(pos token.Pos, V, T Type, cause *string) b
 // with an underlying pointer type!) and returns its base and true.
 // Otherwise it returns (typ, false).
 func deref(typ Type) (Type, bool) {
-       if p, _ := typ.(*Pointer); p != nil {
+       if p, _ := _Unalias(typ).(*Pointer); p != nil {
                // p.base should never be nil, but be conservative
                if p.base == nil {
                        if debug {