Skip to content

Commit 988f18d

Browse files
committed
go/types: export Named._Orig as Named.Origin
Export the _Orig method for Named types, and rename to Origin. As discussed in #47916, Orig is easily confused with Original, which is not as good a name. Spelling out 'Origin' resolves the ambiguity. Updates #47916 Change-Id: I377c73de82310d3f6aa0bd82dddcd60ee067155b Reviewed-on: https://go-review.googlesource.com/c/go/+/350996 Trust: Robert Findley <[email protected]> Run-TryBot: Robert Findley <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Robert Griesemer <[email protected]>
1 parent b6dddac commit 988f18d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/go/types/named.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ func (t *Named) Obj() *TypeName {
9191
return t.orig.obj // for non-instances this is the same as t.obj
9292
}
9393

94-
// _Orig returns the original generic type an instantiated type is derived from.
95-
// If t is not an instantiated type, the result is t.
96-
func (t *Named) _Orig() *Named { return t.orig }
94+
// Origin returns the parameterized type from which the named type t is
95+
// instantiated. If t is not an instantiated type, the result is t.
96+
func (t *Named) Origin() *Named { return t.orig }
9797

9898
// TODO(gri) Come up with a better representation and API to distinguish
9999
// between parameterized instantiated and non-instantiated types.

0 commit comments

Comments
 (0)