We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents db950e5 + 7583f76 commit 194be91Copy full SHA for 194be91
tests/pos/implicits1.scala
@@ -35,11 +35,19 @@ object Implicits {
35
val c: Int = y.elem
36
37
val d: Int = z.foo("abc")
38
-
+
39
//import X.BarDeco
40
41
println(z.bar)
42
43
- val e: Int = z.foo(true)
+ 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("")
52
53
}
0 commit comments