We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e871ba9 commit 4fca4d8Copy full SHA for 4fca4d8
compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala
@@ -594,7 +594,7 @@ object JavaParsers {
594
val vparams = formalParams()
595
if (!isVoid) rtpt = optArrayBrackets(rtpt)
596
optThrows()
597
- val bodyOk = !inInterface || mods.isOneOf(Flags.DefaultMethod | Flags.JavaStatic)
+ val bodyOk = !inInterface || mods.isOneOf(Flags.DefaultMethod | Flags.JavaStatic | Flags.Private)
598
val body =
599
if (bodyOk && in.token == LBRACE)
600
methodBody()
tests/pos/i12956.java
@@ -0,0 +1,3 @@
1
+interface Foo {
2
+ private void bar() {}
3
+}
0 commit comments