-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)java interop
Milestone
Description
Found by doti in scala/scala#8697 (comment)
$> cat A.java
package p;
public abstract class A {
public abstract String s(int i);
}
$> cat Test.scala
package p
class C extends A {
private[p] def s(i: Int) = ""
}
$> scalac Test.scala A.java
$> dotc Test.scala A.java
-- Error: Test.scala:3:17 ------------------------------------------------------
3 | private[p] def s(i: Int) = ""
| ^
|error overriding method s in class A of type (i: Int): String;
| method s of type (i: Int): String has weaker access privileges; it should be public
1 error foundReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
fixed in Scala 3This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)This issue does not exist in the Scala 3 compiler (https://github.com/lampepfl/dotty/)java interop