diff options
Diffstat (limited to 'test/files/run/t3346a.scala')
-rw-r--r-- | test/files/run/t3346a.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/t3346a.scala b/test/files/run/t3346a.scala new file mode 100644 index 0000000000..c0a90b011b --- /dev/null +++ b/test/files/run/t3346a.scala @@ -0,0 +1,11 @@ +import scala.language.implicitConversions + +object Test extends App { + class Rep[T](x : T) + + class SomeOps[T](x : Rep[T]) { def foo = 1 } + implicit def mkOps[X, T](x : X)(implicit conv: X => Rep[T]) : SomeOps[T] = new SomeOps(conv(x)) + + val a: Rep[Int] = new Rep(42) + println(a.foo) +}
\ No newline at end of file |