]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/cmd/compile/internal/types2/object.go
go/types, types2: implement Alias proposal (export API)
[gostls13.git] / src / cmd / compile / internal / types2 / object.go
index 075712dc9ccfeaaa0abdf46fd64d451e309734a1..251587224b825451499be0849a96037a5b68e526 100644 (file)
@@ -285,6 +285,8 @@ func (obj *TypeName) IsAlias() bool {
        switch t := obj.typ.(type) {
        case nil:
                return false
+       // case *Alias:
+       //      handled by default case
        case *Basic:
                // unsafe.Pointer is not an alias.
                if obj.pkg == Unsafe {
@@ -409,7 +411,7 @@ func (obj *Func) Origin() *Func {
 // Pkg returns the package to which the function belongs.
 //
 // The result is nil for methods of types in the Universe scope,
-// like [error.Error].
+// like method Error of the error built-in interface type.
 func (obj *Func) Pkg() *Package { return obj.object.Pkg() }
 
 // hasPtrRecv reports whether the receiver is of the form *T for the given method obj.