summaryrefslogtreecommitdiff
path: root/test/files/neg/anytrait.check
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/anytrait.check')
-rw-r--r--test/files/neg/anytrait.check7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/neg/anytrait.check b/test/files/neg/anytrait.check
new file mode 100644
index 0000000000..9dd970b58c
--- /dev/null
+++ b/test/files/neg/anytrait.check
@@ -0,0 +1,7 @@
+anytrait.scala:3: error: this statement is not allowed in universal trait extending from class Any: private[this] var x: Int = 1
+ var x = 1
+ ^
+anytrait.scala:5: error: this statement is not allowed in universal trait extending from class Any: T.this.x_=(T.this.x.+(1))
+ { x += 1 }
+ ^
+two errors found