-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Closed
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Description
Consider https://gotipplay.golang.org/p/DBMZ9zBIaGB
We have a generic and a normal method named Bar, which result in the following two objects in Info.Defs:
def: Bar = func (pkg.Generic[T]).Bar() [0xc0000699a0]
def: Bar = func (pkg.Normal).Bar() [0xc000069b30]
All calls to Normal.Bar map to the same object in Info.Selections, which is also the object that was recorded in Info.Defs:
use: &{recv Bar} = func (pkg.Normal).Bar() [0xc000069b30]
use: &{recv Bar} = func (pkg.Normal).Bar() [0xc000069b30]
use: &{recv Bar} = func (pkg.Normal).Bar() [0xc000069b30]
However, each call to Generic[T].Bar maps to a different object, none of which matches one in Info.Defs:
use: &{recv Bar} = func (pkg.Generic[T]).Bar() [0xc00013e280]
use: &{recv Bar} = func (pkg.Generic[T]).Bar() [0xc00013e370]
use: &{recv Bar} = func (pkg.Generic[T]).Bar() [0xc00013e460]
(The same behavior can be observed with Info.Uses instead of Info.Selections.)
Is this expected behavior?
/cc @findleyr
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.