From 0de976828e54b2e407f84bd098aea950ef52dbf1 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 12 Jun 2015 17:57:27 +0200 Subject: Drop parameter accessor flag in traits Parameter accessors in traits have the ParamAccessor flag removed in the Mixin transformSym method. --- tests/run/traitParams.scala | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/run/traitParams.scala') diff --git a/tests/run/traitParams.scala b/tests/run/traitParams.scala index c1b77cf37..82c176461 100644 --- a/tests/run/traitParams.scala +++ b/tests/run/traitParams.scala @@ -10,6 +10,12 @@ trait U extends T { State.s += 1 override def f = super.f + y } +trait U2(a: Any) extends T { + def d = a // okay + val v = a // okay + a // used to crash +} + import State._ class C(x: Int) extends U with T(x, x * x + s) class C2(x: Int) extends T(x, x * x + s) with U -- cgit v1.2.3