Skip to content

Commit a11befe

Browse files
committed
JavaParsers: Java interfaces should not have the Abstract flag
The Trait and Abstract flags are not supposed to be set together, and we don't set Abstract when deserializing Java interfaces from classfiles so we shouldn't do it when reading them from source code either. While we're at it, this commit also drops Flags.Trait which is implied by Flags.JavaInterface.
1 parent 1ae85eb commit a11befe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/parsing/JavaParsers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ object JavaParsers {
822822
val iface = atSpan(start, nameOffset) {
823823
TypeDef(
824824
name,
825-
makeTemplate(parents, body, tparams, false)).withMods(mods | Flags.Trait | Flags.JavaInterface | Flags.Abstract)
825+
makeTemplate(parents, body, tparams, false)).withMods(mods | Flags.JavaInterface)
826826
}
827827
addCompanionObject(statics, iface)
828828
}

0 commit comments

Comments
 (0)