diff options
author | Nada Amin <namin@alum.mit.edu> | 2012-02-23 16:06:58 +0100 |
---|---|---|
committer | Nada Amin <namin@alum.mit.edu> | 2012-02-23 16:06:58 +0100 |
commit | f9f888d36a265052c67a2c486d569a4c75657eab (patch) | |
tree | 1bb20e6e8038eb2c619b079d9a0f9e13bcb87f19 /test/files/neg | |
parent | d5006b118f6ad1bf10ed35491cd0bda05fc88972 (diff) | |
download | scala-f9f888d36a265052c67a2c486d569a4c75657eab.tar.gz scala-f9f888d36a265052c67a2c486d569a4c75657eab.tar.bz2 scala-f9f888d36a265052c67a2c486d569a4c75657eab.zip |
Add test for AbstractionFromVolatileTypeError.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/abstraction-from-volatile-type-error.check | 4 | ||||
-rw-r--r-- | test/files/neg/abstraction-from-volatile-type-error.scala | 11 |
2 files changed, 15 insertions, 0 deletions
diff --git a/test/files/neg/abstraction-from-volatile-type-error.check b/test/files/neg/abstraction-from-volatile-type-error.check new file mode 100644 index 0000000000..34ba0551a5 --- /dev/null +++ b/test/files/neg/abstraction-from-volatile-type-error.check @@ -0,0 +1,4 @@ +abstraction-from-volatile-type-error.scala:9: error: illegal abstraction from value with volatile type a.Tv + val tv : a.Tv + ^ +one error found diff --git a/test/files/neg/abstraction-from-volatile-type-error.scala b/test/files/neg/abstraction-from-volatile-type-error.scala new file mode 100644 index 0000000000..5afcb3ec7d --- /dev/null +++ b/test/files/neg/abstraction-from-volatile-type-error.scala @@ -0,0 +1,11 @@ +class A { + type T + type Tv = AnyRef with T +} + +object Test { + type B = a.type forSome { + val a : A + val tv : a.Tv + } +} |