aboutsummaryrefslogtreecommitdiff
path: root/tests/run/traitParams.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-06-12 17:57:27 +0200
committerMartin Odersky <odersky@gmail.com>2015-06-19 12:11:18 +0200
commit0de976828e54b2e407f84bd098aea950ef52dbf1 (patch)
tree5e5b933447f4abb6121fb28853557c8623a7fda7 /tests/run/traitParams.scala
parentece6ed49412802909a0e57405331a834cff8d6dc (diff)
downloaddotty-0de976828e54b2e407f84bd098aea950ef52dbf1.tar.gz
dotty-0de976828e54b2e407f84bd098aea950ef52dbf1.tar.bz2
dotty-0de976828e54b2e407f84bd098aea950ef52dbf1.zip
Drop parameter accessor flag in traits
Parameter accessors in traits have the ParamAccessor flag removed in the Mixin transformSym method.
Diffstat (limited to 'tests/run/traitParams.scala')
-rw-r--r--tests/run/traitParams.scala6
1 files changed, 6 insertions, 0 deletions
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