diff options
author | Martin Odersky <odersky@gmail.com> | 2015-06-28 19:26:21 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-07-06 16:55:51 +0200 |
commit | 1061743aaaf2b18419c8fdb1cc89cb1498c9673f (patch) | |
tree | f2a2c4ab7afc7fa7a534ab84543e22e8e465098d /test/dotc/tests.scala | |
parent | c277b9865b8a9a0f72279e0a33184ec3a4efcc33 (diff) | |
download | dotty-1061743aaaf2b18419c8fdb1cc89cb1498c9673f.tar.gz dotty-1061743aaaf2b18419c8fdb1cc89cb1498c9673f.tar.bz2 dotty-1061743aaaf2b18419c8fdb1cc89cb1498c9673f.zip |
Error instead of crash when sigName comes up with a missing reference.
A TypeRef can have be unresolved, either because it refers to something that's missing
from the classpath or because of transitive self type references. Instead of crashing
in sigName, we now report the error.
Achieved by defining a new exception type, MissingType, which derives from TypeError.
This catches t7933.scala, now integrated in the neg/selfreq.scala. The problem there was
a reference to AbsSettings, which was not a member of StandardScalaSettings.this,
but was a member of the required type of AbsSettings, which itself appeared in the
required type of StandardScalaSettings. We will outlaw in the next commit such transitive
required references.
Also collapsed TypeError and FatalTypeError. It was a misnomer anyway. Fatal were those
type errors that were caught and reported!
Open: Where else we should check for unresolved NamedTypes.
Diffstat (limited to 'test/dotc/tests.scala')
-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 f222daca4..ee7b93297 100644 --- a/test/dotc/tests.scala +++ b/test/dotc/tests.scala @@ -139,6 +139,7 @@ class tests extends CompilerTest { @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 neg_selfreq = compileFile(negDir, "selfreq", xerrors = 4) @Test def neg_shadowedImplicits = compileFile(negDir, "arrayclone-new", xerrors = 2) @Test def neg_traitParamsTyper = compileFile(negDir, "traitParamsTyper", xerrors = 5) @Test def neg_traitParamsMixin = compileFile(negDir, "traitParamsMixin", xerrors = 2) |