aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/neg/t391.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/untried/neg/t391.scala')
-rw-r--r--tests/untried/neg/t391.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/untried/neg/t391.scala b/tests/untried/neg/t391.scala
new file mode 100644
index 000000000..08c083baa
--- /dev/null
+++ b/tests/untried/neg/t391.scala
@@ -0,0 +1,6 @@
+trait C {
+ def fun1(def x: Int): Int = x; // the "def x" is illegal
+ def fun2(val x: Int): Int = x; // the "val x" is illegal
+}
+
+class E(def x: Int); // the "def x" is illegal