diff options
author | Martin Odersky <odersky@gmail.com> | 2015-04-13 15:47:54 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-04-13 16:06:01 +0200 |
commit | 046376e48bd3c4a294cef239a6cc77a61b62bc6e (patch) | |
tree | d38a3d329da8ece65029b6167e55c62e39e38d2c /test | |
parent | 04eea24326c3a42ad908fe45e204af41b880f2cd (diff) | |
download | dotty-046376e48bd3c4a294cef239a6cc77a61b62bc6e.tar.gz dotty-046376e48bd3c4a294cef239a6cc77a61b62bc6e.tar.bz2 dotty-046376e48bd3c4a294cef239a6cc77a61b62bc6e.zip |
Added phase to check `New` nodes for instantiability.
- Abstract classes cannot be instantiated (exceptions:
parent news and Java annotations)
- Instantiateed class must conform to its self type.
Diffstat (limited to 'test')
-rw-r--r-- | test/dotc/tests.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala index c3f501a52..b9ed6fb03 100644 --- a/test/dotc/tests.scala +++ b/test/dotc/tests.scala @@ -126,6 +126,7 @@ class tests extends CompilerTest { @Test def neg_i0281 = compileFile(negDir, "i0281-null-primitive-conforms", xerrors = 3) @Test def neg_moduleSubtyping = compileFile(negDir, "moduleSubtyping", xerrors = 4) @Test def neg_escapingRefs = compileFile(negDir, "escapingRefs", xerrors = 2) + @Test def neg_instantiateAbstract = compileFile(negDir, "instantiateAbstract", xerrors = 8) @Test def neg_selfInheritance = compileFile(negDir, "selfInheritance", xerrors = 5) @Test def dotc = compileDir(dotcDir + "tools/dotc", failedOther)(allowDeepSubtypes ++ twice) // see dotc_core |