You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
package x
type A struct{ B }
type B struct{ F int }
type T struct { A; B struct { F int } }
var _ = T{}.F
Invoking unbed on A.B currently rewrites T{}.F to T{}.B.F, but the explicit B selection matches against T's field because it has a shallower embedding depth than T{}.A.B. This is a change in semantics.
Unbed could rewrite to T{}.A.B, but in general there are multiple possible qualifications that could be valid, and it's not obvious how unbed should choose one.
In the mean time, unbed should at least detect and reject this scenario.
The text was updated successfully, but these errors were encountered:
Consider:
Invoking unbed on A.B currently rewrites
T{}.F
toT{}.B.F
, but the explicitB
selection matches againstT
's field because it has a shallower embedding depth thanT{}.A.B
. This is a change in semantics.Unbed could rewrite to
T{}.A.B
, but in general there are multiple possible qualifications that could be valid, and it's not obvious how unbed should choose one.In the mean time, unbed should at least detect and reject this scenario.
The text was updated successfully, but these errors were encountered: