diff options
author | Paul Phillips <paulp@improving.org> | 2012-11-14 11:40:12 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-11-14 12:28:45 -0800 |
commit | 24958f7a8b1748be0c462b4563e652c9f7e24d6a (patch) | |
tree | b5a0e79013273dbb359cc6fa46d59bfa38e7cc99 /test | |
parent | ed6520b4fa002ea143cead5eb3633839d500e08d (diff) | |
download | scala-24958f7a8b1748be0c462b4563e652c9f7e24d6a.tar.gz scala-24958f7a8b1748be0c462b4563e652c9f7e24d6a.tar.bz2 scala-24958f7a8b1748be0c462b4563e652c9f7e24d6a.zip |
Fix for SI-6664, cycle in case classes.
Scope lookup of an overloaded symbol was accidentally
forcing some lazy info. Since as usual the caller didn't
even have any interest in the symbol, but only in whether
the name existed at all, I changed it call the method I
made for this exact purpose, containsName. Also I much
reduced the number of checks being made in the quest for
an inherited copy method.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/t6664.scala | 4 | ||||
-rw-r--r-- | test/files/pos/t6664b.scala | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/test/files/pos/t6664.scala b/test/files/pos/t6664.scala new file mode 100644 index 0000000000..7eb85f619d --- /dev/null +++ b/test/files/pos/t6664.scala @@ -0,0 +1,4 @@ +final case class A(i: Int, s: String) { + protected def copy(s2: String): A = A(i, s2) + protected def copy(i2: Int): A = A(i2, s) +} diff --git a/test/files/pos/t6664b.scala b/test/files/pos/t6664b.scala new file mode 100644 index 0000000000..a622866838 --- /dev/null +++ b/test/files/pos/t6664b.scala @@ -0,0 +1,5 @@ +object T { + def A(s: String): A = new A(3, s) + def A(i: Int): A = A(i, "abc") + case class A(i: Int, s: String) +} |