diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-05-21 19:24:02 +0200 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-05-21 19:24:02 +0200 |
commit | 7c908309953f15baed47b1e4cae1d720f9787bbb (patch) | |
tree | 7e8d433fab2c0561744c1c50b5c7e65c4670ce51 /test/files/run/t7436.scala | |
parent | f81a4f92967a2dd69784864e9ab9e1624d7db35b (diff) | |
download | scala-7c908309953f15baed47b1e4cae1d720f9787bbb.tar.gz scala-7c908309953f15baed47b1e4cae1d720f9787bbb.tar.bz2 scala-7c908309953f15baed47b1e4cae1d720f9787bbb.zip |
SI-7436 Varargs awareness for super param aliasing.
Don't consider a super class parameter accessor to be
an alias if it is a repeated. Parameter aliases are used
to avoid retaining redundant fields in the subclass; but
that optimization is out of the question here.
Diffstat (limited to 'test/files/run/t7436.scala')
-rw-r--r-- | test/files/run/t7436.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/files/run/t7436.scala b/test/files/run/t7436.scala new file mode 100644 index 0000000000..867a931e05 --- /dev/null +++ b/test/files/run/t7436.scala @@ -0,0 +1,9 @@ +class A(val p: Int*) + +class B(val p1: Int) extends A(p1) + +object Test { + def main(args: Array[String]) { + new B(1).p1 // threw java.lang.ClassCastException: scala.collection.mutable.WrappedArray$ofInt cannot be cast to java.lang.Integer + } +} |