diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2012-10-07 15:16:31 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2012-10-07 17:17:24 +0200 |
commit | 1b2ac4e618fd3e95efdeb965b0deebc2c5f78580 (patch) | |
tree | 8a83a7581bdb4493fa1a17cae4eefeb03b269e78 /src | |
parent | bfde8c79cf68541e29e60d22371bcc4669be7b83 (diff) | |
download | scala-1b2ac4e618fd3e95efdeb965b0deebc2c5f78580.tar.gz scala-1b2ac4e618fd3e95efdeb965b0deebc2c5f78580.tar.bz2 scala-1b2ac4e618fd3e95efdeb965b0deebc2c5f78580.zip |
SI-6483 Prohibit super[T] references in value classes.
This seems the safest course of action for 2.10.0.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 5a9920c9e3..f82786da35 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1420,6 +1420,9 @@ trait Typers extends Modes with Adaptations with Tags { case x: ValDef if x.mods.isLazy => //see https://issues.scala-lang.org/browse/SI-6358 implRestriction(tree, "lazy val") + case Select(sup @ Super(qual, mix), selector) if selector != nme.CONSTRUCTOR && qual.symbol == clazz && mix != tpnme.EMPTY => + //see https://issues.scala-lang.org/browse/SI-6483 + implRestriction(sup, "qualified super reference") case _ => } super.traverse(tree) |