summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorAleksandar Pokopec <aleksandar.prokopec@epfl.ch>2011-09-27 17:02:50 +0000
committerAleksandar Pokopec <aleksandar.prokopec@epfl.ch>2011-09-27 17:02:50 +0000
commit148f4ef194180e03afdeba563aa822e7fb459c75 (patch)
tree5c36c73595d83d50f1a9474d5e30d763836c6dc7 /test/files/pos
parent7dfb214aaae80675d5c0c95d1faaf9d5fd6da5be (diff)
downloadscala-148f4ef194180e03afdeba563aa822e7fb459c75.tar.gz
scala-148f4ef194180e03afdeba563aa822e7fb459c75.tar.bz2
scala-148f4ef194180e03afdeba563aa822e7fb459c75.zip
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.
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/code-pos.log6
-rw-r--r--test/files/pos/t4716.scala10
2 files changed, 16 insertions, 0 deletions
diff --git a/test/files/pos/code-pos.log b/test/files/pos/code-pos.log
new file mode 100644
index 0000000000..cdfc8f194c
--- /dev/null
+++ b/test/files/pos/code-pos.log
@@ -0,0 +1,6 @@
+code.scala:16: error: type mismatch;
+ found : reflect.runtime.Mirror.Tree
+ required: reflect.package.mirror.Tree
+ val ttree = toolbox.typeCheck(tree, targetType)
+ ^
+one error found
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
+ }
+}