diff options
Diffstat (limited to 'test/files/neg/t6276.scala')
-rw-r--r-- | test/files/neg/t6276.scala | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/files/neg/t6276.scala b/test/files/neg/t6276.scala index 8333618964..bd0a473f71 100644 --- a/test/files/neg/t6276.scala +++ b/test/files/neg/t6276.scala @@ -1,8 +1,11 @@ object Test { def foo(a: Int, b: Int, c: Int) { - new { + class C { def a: Any = a // warn val b: Any = b // warn + + def c: Any = this.c // warn + def d: Any = C.this.d // warn } def method { @@ -25,5 +28,17 @@ object Test { val b: Any = {println(""); b} def c(i: Int): Any = c(i - 0) } + + class D { + def other: D = null + def foo: Any = other.foo + } + + class E { + def foo: Any = 0 + class D extends E { + override def foo: Any = E.this.foo + } + } } } |