aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorliu fengyun <liu@fengy.me>2017-03-14 11:23:05 +0100
committerliu fengyun <liu@fengy.me>2017-03-14 11:23:05 +0100
commitc08ea413282b76865abbbda38addcbce35953f24 (patch)
treef1a1e888802b50e95040afc341c883465ddeb866 /tests
parentf4ad5357ffeb4b90777f73e4f1e32cbacbebd33c (diff)
downloaddotty-c08ea413282b76865abbbda38addcbce35953f24.tar.gz
dotty-c08ea413282b76865abbbda38addcbce35953f24.tar.bz2
dotty-c08ea413282b76865abbbda38addcbce35953f24.zip
add neg test for #2051
Diffstat (limited to 'tests')
-rw-r--r--tests/neg/i2051.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/neg/i2051.scala b/tests/neg/i2051.scala
new file mode 100644
index 000000000..2295a05ab
--- /dev/null
+++ b/tests/neg/i2051.scala
@@ -0,0 +1,2 @@
+abstract class C { val x: Int }
+class D extends C { def x = 1 } // error: method x of type => Int needs to be a stable, immutable value