blob: 02b74de2b0e7b8877735eb4e69cf2c46b68664a0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
object O {
implicit class C(s: String) {
def twice = s + s
}
}
/**
//
// We'd like to augment object O in Namers so that it also has an implicit method
object O {
implicit class C(s: String) {
def twice = s + s
}
implicit def C(s: String): C = new C(s)
}
**/
|