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
pubmod a {pubtraitA{fnfoo(&self);}}pubmod b {use a::A;pubstructB;implAforB{fnfoo(&self){}}pubmod c {use b::B;fnfoo(b:&B){
b.foo();// trait A is not in scope at this location}}}fnmain(){}
That code compiles successfully, but I don't believe that it should. A the commented line, the trait A is not in scope for the module c, so I should get an error that b doesn't have any method named foo in scope.
Nominating, this is a backwards-compatibility issue.
The text was updated successfully, but these errors were encountered:
From what I could tell, it appeared that if any of your ancestors imported a trait, then it was automatically in-scope for any descendant. This seems like abstraction leakage which should be plugged.
That code compiles successfully, but I don't believe that it should. A the commented line, the trait
A
is not in scope for the modulec
, so I should get an error thatb
doesn't have any method namedfoo
in scope.Nominating, this is a backwards-compatibility issue.
The text was updated successfully, but these errors were encountered: