diff options
Diffstat (limited to 'tests/neg/i2066.scala')
-rw-r--r-- | tests/neg/i2066.scala | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/neg/i2066.scala b/tests/neg/i2066.scala new file mode 100644 index 000000000..0081cec07 --- /dev/null +++ b/tests/neg/i2066.scala @@ -0,0 +1,27 @@ +class Foo + +object Test { + implicit def two(x: Foo): Two = new Two(x) + + class Two(x: Foo) { + private def meth: Unit = {} + + def test2(foo: Foo): Unit = { + foo.meth // error + } + } +} + + +object Test2 { + + class Two(x: Foo) { + implicit def two(x: Foo): Two = new Two(x) + + private def meth: Unit = {} + + def test2(foo: Foo): Unit = { + foo.meth // error + } + } +} |