From 5c84dc85bf1a19aedf1ad96c9b8007c1368dd79f Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Thu, 3 May 2012 20:58:38 -0700 Subject: 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. --- test/files/pos/t5667.scala | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/files/pos/t5667.scala (limited to 'test/files/pos') 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) +} -- cgit v1.2.3