summaryrefslogtreecommitdiff
path: root/test/files/pos/t5667.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-05-03 20:58:38 -0700
committerPaul Phillips <paulp@improving.org>2012-05-03 21:35:53 -0700
commit5c84dc85bf1a19aedf1ad96c9b8007c1368dd79f (patch)
tree43efea9054c3c8fc23caf74fd4816903c1f00557 /test/files/pos/t5667.scala
parent043ce6d0565c9d5d960d4c09926014d51b9c5b70 (diff)
downloadscala-5c84dc85bf1a19aedf1ad96c9b8007c1368dd79f.tar.gz
scala-5c84dc85bf1a19aedf1ad96c9b8007c1368dd79f.tar.bz2
scala-5c84dc85bf1a19aedf1ad96c9b8007c1368dd79f.zip
Fix for implicit class / value class collision.
New this week, on SCALA. Implicit class: "Spin me up an implicit method with my name." Value class: "I need a companion object, pronto." Narrator: "All was well with this arrangement... UNTIL." What happens when these two wacky SIPs get together in the very same class? You'll laugh until, eventually, you cry! Weeknights at 9:30pm, only on SCALA. Closes SI-5667.
Diffstat (limited to 'test/files/pos/t5667.scala')
-rw-r--r--test/files/pos/t5667.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/files/pos/t5667.scala b/test/files/pos/t5667.scala
new file mode 100644
index 0000000000..513de5b663
--- /dev/null
+++ b/test/files/pos/t5667.scala
@@ -0,0 +1,6 @@
+object Main {
+ implicit class C(val s: String) extends AnyVal
+ implicit class C2(val s: String) extends AnyRef
+
+ implicit case class Foo(i: Int)
+}