diff options
Diffstat (limited to 'tests/untried/neg/t5354.scala')
-rw-r--r-- | tests/untried/neg/t5354.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/untried/neg/t5354.scala b/tests/untried/neg/t5354.scala new file mode 100644 index 000000000..99b565015 --- /dev/null +++ b/tests/untried/neg/t5354.scala @@ -0,0 +1,15 @@ +package object foo { + implicit def x123: Bippy = new Bippy("x") +} +package foo { + class Bippy(override val toString: String){ } + class Dingus { + def f1 = { + implicit def z: Bippy = new Bippy("z") + implicitly[Bippy] + } + } + object Test extends App { + println(new Dingus().f1) + } +} |