diff options
Diffstat (limited to 'test/pending/run')
-rw-r--r-- | test/pending/run/implicit-classes.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/pending/run/implicit-classes.scala b/test/pending/run/implicit-classes.scala new file mode 100644 index 0000000000..02b74de2b0 --- /dev/null +++ b/test/pending/run/implicit-classes.scala @@ -0,0 +1,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) +} + +**/ |