aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-12-13 19:15:47 +0100
committerMartin Odersky <odersky@gmail.com>2014-12-13 19:15:58 +0100
commit9f87127c40a2b8ac0c8f97d039053e4d2f7577e4 (patch)
treeacf8cc3575bcc625aaf7e1715ba60a0c71b89b1b /test
parentf3d887f079efbe7dbb53abd22bd212eee8e1c67a (diff)
downloaddotty-9f87127c40a2b8ac0c8f97d039053e4d2f7577e4.tar.gz
dotty-9f87127c40a2b8ac0c8f97d039053e4d2f7577e4.tar.bz2
dotty-9f87127c40a2b8ac0c8f97d039053e4d2f7577e4.zip
Disable implicit conversions between from `Null` and `Nothing`.
This is necessary to reject code like val x: Boolean = null Without the restriction, this code would typecheck and expand to val x: Boolean = Predef.Boolean2boolean(null) since `null` counts as a value of type `java.kang.Boolean`.
Diffstat (limited to 'test')
-rw-r--r--test/dotc/tests.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala
index f5072be96..4de8df8ad 100644
--- a/test/dotc/tests.scala
+++ b/test/dotc/tests.scala
@@ -108,6 +108,7 @@ class tests extends CompilerTest {
@Test def neg_boundspropagation = compileFile(negDir, "boundspropagation", xerrors = 4)
@Test def neg_refinedSubtyping = compileFile(negDir, "refinedSubtyping", xerrors = 2)
@Test def neg_i0248_inherit_refined = compileFile(negDir, "i0248-inherit-refined", xerrors = 4)
+ @Test def neg_i0281 = compileFile(negDir, "i0281-null-primitive-conforms", xerrors = 3)
@Test def dotc = compileDir(dotcDir + "tools/dotc", twice)(allowDeepSubtypes)
@Test def dotc_ast = compileDir(dotcDir + "tools/dotc/ast", twice)