Skip to content

Commit 194be91

Browse files
committed
Merge pull request #63 from odersky/implicit-test
Added test for implicits which fail in Scala 2.11.
2 parents db950e5 + 7583f76 commit 194be91

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/pos/implicits1.scala

+10-2
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,19 @@ object Implicits {
3535
val c: Int = y.elem
3636

3737
val d: Int = z.foo("abc")
38-
38+
3939
//import X.BarDeco
4040

4141
println(z.bar)
4242

43-
val e: Int = z.foo(true)
43+
val e: Int = z.foo(true)
44+
45+
// Haoyi Li's example on scala-user:
46+
47+
trait Modifier
48+
49+
implicit def stringNode(v: String): Modifier = new Modifier {}
50+
51+
val s: Modifier = Some("rd").getOrElse("")
4452

4553
}

0 commit comments

Comments
 (0)