aboutsummaryrefslogtreecommitdiff
path: root/tests/neg
diff options
context:
space:
mode:
Diffstat (limited to 'tests/neg')
-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