diff options
Diffstat (limited to 'tests/untried/neg/t6667b.scala')
-rw-r--r-- | tests/untried/neg/t6667b.scala | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/untried/neg/t6667b.scala b/tests/untried/neg/t6667b.scala new file mode 100644 index 000000000..db31c0a9b --- /dev/null +++ b/tests/untried/neg/t6667b.scala @@ -0,0 +1,25 @@ +object Test { + abstract class Box { + val value: Int + } + + implicit val a: Box = new Box { + val value= 1 + } + + def main(args: Array[String]): Unit = { + implicit val b: Box= new Box { + val value= 2 + } + + new Object { + new Test() + } + // compare with: + new Test() + } +} + +class Test()(implicit x: Test.Box) { + println(x.value) +} |