Skip to content

Commit cec236b

Browse files
committed
compiler: include the scope in the type code name
Fixes #5180
1 parent 707d37a commit cec236b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

compiler/interface.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ func getTypeCodeName(t types.Type) (string, bool) {
518518
switch t := types.Unalias(t).(type) {
519519
case *types.Named:
520520
if t.Obj().Parent() != t.Obj().Pkg().Scope() {
521-
return "named:" + t.String() + "$local", true
521+
return "named:" + t.String() + "$local:" + fmt.Sprintf("%p", t.Obj().Parent()), true
522522
}
523523
return "named:" + t.String(), false
524524
case *types.Array:

0 commit comments

Comments
 (0)