From 1b2ac4e618fd3e95efdeb965b0deebc2c5f78580 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Sun, 7 Oct 2012 15:16:31 +0200 Subject: SI-6483 Prohibit super[T] references in value classes. This seems the safest course of action for 2.10.0. --- src/compiler/scala/tools/nsc/typechecker/Typers.scala | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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) -- cgit v1.2.3