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
There are actually two bugs, which may or may not be related. The first bug occurs when extening a java class with package protected memebers.
The second bug occurs when methods using package protected members get inlined (requires -optimise switch).
Java class:
packagetest;
classPackageProtected {
int foo;
}
Scala:
packagetestfinalclassTestextendsPackageProtected {
defbar= foo
}
packageanother {
objectMain {
defbug1(t: Test) {
// Can always be replicated.
println(t.foo)
}
defbug2(t: Test) {
// Conditions to replicate: must use -optimise, class Test must be final
println(t.bar)
//@noinline is a usable workaround
}
defmain(args: Array[String]) {
bug1(newTest)
bug2(newTest)
}
}
}
The text was updated successfully, but these errors were encountered:
@adriaanm said:
(In r22755) closes #3663. disregard package nesting for access check of java syms
namers wasn't setting privateWithin on java-defined variables (btw, shouldn't clone carry over privateWithin?)
better treatment of linked class access boundary (only check for access within linked class if it actually exists)
would have liked more control for the test case: only javac should compile the java file, then scalac should compile the scala file and fail
There are actually two bugs, which may or may not be related. The first bug occurs when extening a java class with package protected memebers.
The second bug occurs when methods using package protected members get inlined (requires -optimise switch).
Java class:
Scala:
The text was updated successfully, but these errors were encountered: