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
Non-local private fields can be accessed by other instances of the class.
However, this creates the following issue:
```
inline trait A:
private val x = 1
def eq(o: A) = o.x == x
class B extends A
```
In the code above, when we inline the code into B, `o.x` accesses a private field of A from B, which is not allowed.
To allow this, we'd need to either make x protected, or change the signature of `eq` to take a B instead.
0 commit comments