diff options
author | Martin Odersky <odersky@gmail.com> | 2012-02-13 09:02:38 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2012-02-13 09:04:17 +0100 |
commit | 436f141d21db0b5fa88adc9ada7059e992be58cc (patch) | |
tree | ccce44a7d699dfea322c6304e03cb5a276d396f3 /test/files | |
parent | 52c99f57ef41c436719818b8e3860e3bfbf023e2 (diff) | |
download | scala-436f141d21db0b5fa88adc9ada7059e992be58cc.tar.gz scala-436f141d21db0b5fa88adc9ada7059e992be58cc.tar.bz2 scala-436f141d21db0b5fa88adc9ada7059e992be58cc.zip |
Added missing files from last commit
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/neg/anytrait.check | 7 | ||||
-rw-r--r-- | test/files/neg/anytrait.scala | 10 | ||||
-rw-r--r-- | test/files/run/Meter.check | 7 |
3 files changed, 24 insertions, 0 deletions
diff --git a/test/files/neg/anytrait.check b/test/files/neg/anytrait.check new file mode 100644 index 0000000000..99c24b85a0 --- /dev/null +++ b/test/files/neg/anytrait.check @@ -0,0 +1,7 @@ +anytrait.scala:3: error: this statement is not allowed in trait extending from class Any: private[this] var x: Int = 1 + var x = 1 + ^ +anytrait.scala:5: error: this statement is not allowed in trait extending from class Any: T.this.x_=(T.this.x.+(1)) + { x += 1 } + ^ +two errors found diff --git a/test/files/neg/anytrait.scala b/test/files/neg/anytrait.scala new file mode 100644 index 0000000000..1501486105 --- /dev/null +++ b/test/files/neg/anytrait.scala @@ -0,0 +1,10 @@ +trait T extends Any { + + var x = 1 + + { x += 1 } + + type T = Int + + val y: T +} diff --git a/test/files/run/Meter.check b/test/files/run/Meter.check new file mode 100644 index 0000000000..a936073489 --- /dev/null +++ b/test/files/run/Meter.check @@ -0,0 +1,7 @@ +2.0 +4.0m +false +x.hashCode: 1072693248 +x == 1: false +x == y: true +a == b: true |