diff options
author | Martin Odersky <odersky@gmail.com> | 2008-09-04 16:33:51 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-09-04 16:33:51 +0000 |
commit | 3e0cd7e7488477e60eb8d12ffeea1b3dc02433a5 (patch) | |
tree | 39e044e9c789277e68c89a72533088dc4190e8d7 /test/files/neg/null-unsoundness.scala | |
parent | 743edeefd44939ada6e81c5936cc04f7c6601931 (diff) | |
download | scala-3e0cd7e7488477e60eb8d12ffeea1b3dc02433a5.tar.gz scala-3e0cd7e7488477e60eb8d12ffeea1b3dc02433a5.tar.bz2 scala-3e0cd7e7488477e60eb8d12ffeea1b3dc02433a5.zip |
now checking for volatile types.
Diffstat (limited to 'test/files/neg/null-unsoundness.scala')
-rw-r--r-- | test/files/neg/null-unsoundness.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/neg/null-unsoundness.scala b/test/files/neg/null-unsoundness.scala new file mode 100644 index 0000000000..d30ff613b1 --- /dev/null +++ b/test/files/neg/null-unsoundness.scala @@ -0,0 +1,15 @@ +class B +class C(x: String) extends B + +class A { + type A >: Null + class D { type T >: C <: B } + val x: D with A = null + var y: x.T = new C("abc") +} +object Test extends A with Application { + class C { type T = Int; val x = 1 } + type A = C + y = 42 +} + |