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
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:All calls to Normal.Bar map to the same object in Info.Selections, which is also the object that was recorded in Info.Defs:
However, each call to Generic[T].Bar maps to a different object, none of which matches one in Info.Defs:
(The same behavior can be observed with Info.Uses instead of Info.Selections.)
Is this expected behavior?
/cc @findleyr