diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 4 | ||||
-rw-r--r-- | test/files/pos/t2664.scala | 9 | ||||
-rw-r--r-- | test/files/pos/t2698.scala | 10 |
3 files changed, 21 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index 356f4621a4..ccb46c0500 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -1563,9 +1563,9 @@ self => */ private def normalize(mods: Modifiers): Modifiers = if ((mods hasFlag Flags.PRIVATE) && mods.privateWithin != nme.EMPTY.toTypeName) - mods &~ Flags.PRIVATE + normalize(mods &~ Flags.PRIVATE) else if ((mods hasFlag Flags.ABSTRACT) && (mods hasFlag Flags.OVERRIDE)) - mods &~ (Flags.ABSTRACT | Flags.OVERRIDE) | Flags.ABSOVERRIDE + normalize(mods &~ (Flags.ABSTRACT | Flags.OVERRIDE) | Flags.ABSOVERRIDE) else mods diff --git a/test/files/pos/t2664.scala b/test/files/pos/t2664.scala new file mode 100644 index 0000000000..7b667d0106 --- /dev/null +++ b/test/files/pos/t2664.scala @@ -0,0 +1,9 @@ +package pkg1 { + class C { + private[pkg1] def foo: Int = 1 + } + + trait T extends C { + private[pkg1] abstract override def foo = super.foo + 1 + } +} diff --git a/test/files/pos/t2698.scala b/test/files/pos/t2698.scala new file mode 100644 index 0000000000..0e2662de61 --- /dev/null +++ b/test/files/pos/t2698.scala @@ -0,0 +1,10 @@ +import scala.collection._ +import scala.util.regexp._ + +abstract class S2 { + val lang: WordExp + type __labelT = lang._labelT + + var deltaq: Array[__labelT] = _ + def delta1 = immutable.Map(deltaq.zipWithIndex: _*) +} |