diff options
Diffstat (limited to 'tests/untried/pos/t6201.scala')
-rw-r--r-- | tests/untried/pos/t6201.scala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/untried/pos/t6201.scala b/tests/untried/pos/t6201.scala new file mode 100644 index 000000000..9d6667b6f --- /dev/null +++ b/tests/untried/pos/t6201.scala @@ -0,0 +1,19 @@ +// probably needs xml's weirdness to reproduce +// (specifically, _root_.scala.xml.Null being in the root package) +class Elem + +class Test { + def elem: Elem = ??? + + class Foo1 { + def must(x: Elem) = () + } + + class Foo2 { + def must(x: Int) = () + } + implicit def toFoo1(s: Elem) = new Foo1() + implicit def toFoo2(s: Elem) = new Foo2() + + def is: Unit = { (elem) } +} |