From 148f4ef194180e03afdeba563aa822e7fb459c75 Mon Sep 17 00:00:00 2001 From: Aleksandar Pokopec Date: Tue, 27 Sep 2011 17:02:50 +0000 Subject: Fixes #4716. During the generation of the specialized method implementation, local lazy vals in specialized classes were getting duplicated and assigned new (different) names. Also, the identifiers referring to them were not getting updated. This is fixed now. Further, the mutable flag is no longer getting set for a lazy val during method body duplication. Review by Dragos. --- test/files/pos/t4716.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/files/pos/t4716.scala (limited to 'test/files/pos/t4716.scala') diff --git a/test/files/pos/t4716.scala b/test/files/pos/t4716.scala new file mode 100644 index 0000000000..ec29e8d2cb --- /dev/null +++ b/test/files/pos/t4716.scala @@ -0,0 +1,10 @@ + + + + +trait Bug2[@specialized(Int) +A] extends TraversableOnce[A] { + def ++[B >: A](that: TraversableOnce[B]) = { + lazy val it = that.toIterator + it + } +} -- cgit v1.2.3