summaryrefslogtreecommitdiff
path: root/test/files/neg/nullary-override.check
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/nullary-override.check')
-rw-r--r--test/files/neg/nullary-override.check4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/files/neg/nullary-override.check b/test/files/neg/nullary-override.check
new file mode 100644
index 0000000000..6b2ded2d4a
--- /dev/null
+++ b/test/files/neg/nullary-override.check
@@ -0,0 +1,4 @@
+nullary-override.scala:2: error: non-nullary method overrides nullary method
+class B extends A { override def x(): Int = 4 }
+ ^
+one error found