diff options
author | Martin Odersky <odersky@gmail.com> | 2009-11-24 16:12:18 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2009-11-24 16:12:18 +0000 |
commit | d26b2f2b94af88eab8494c04924c86e6efd8e888 (patch) | |
tree | 0e2a5d9d95e7e8dfefeb74a4bd139e5f13882ccd | |
parent | f3fa2e86d405d8b29b97a73fcb9e8ef12d64fa17 (diff) | |
download | scala-d26b2f2b94af88eab8494c04924c86e6efd8e888.tar.gz scala-d26b2f2b94af88eab8494c04924c86e6efd8e888.tar.bz2 scala-d26b2f2b94af88eab8494c04924c86e6efd8e888.zip |
Closed #2664
-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: _*) +} |