diff options
Diffstat (limited to 'test/files/neg/t0209.scala')
-rwxr-xr-x | test/files/neg/t0209.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/files/neg/t0209.scala b/test/files/neg/t0209.scala new file mode 100755 index 0000000000..ecbe183e35 --- /dev/null +++ b/test/files/neg/t0209.scala @@ -0,0 +1,17 @@ +abstract class A { + def f(x : this.type) : B +} + +class B extends A { + override def f(x : this.type) : B = x +} + +class C extends A { + override def f(x : this.type) : B = null +} + +object Program { + def main(args : Array[String]) { + (new B: A).f(new C) + } +} |