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
[error] method fooProtected in classFoo cannot be accessed asa member of
[error] (Foo$_this : (scalqa.Foo: scalqa.Foo.type)) from module classBar$.
[error] Access to protected method fooProtected not permitted because enclosing objectBar in packagescalqa
[error] is not a subclass of classFoo in packagescalqawheretargetisdefined
Expectation
The error is legitimate, you cannot inline protected method call into unprotected context.
However, if the protected method is inlined itself, it is a different story. The call must be permitted (not sure if the context of the method should be examined for further restrictions, in all my scenarios it is really simple).
This is not a trivial issue. For libraries which heavily rely on inlining this is a major design hurdle.
The text was updated successfully, but these errors were encountered:
Minimized code
Output
Expectation
The error is legitimate, you cannot inline protected method call into unprotected context.
However, if the protected method is inlined itself, it is a different story. The call must be permitted (not sure if the context of the method should be examined for further restrictions, in all my scenarios it is really simple).
This is not a trivial issue. For libraries which heavily rely on inlining this is a major design hurdle.
The text was updated successfully, but these errors were encountered: