aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotty/tools/dotc/typer/Inferencing.scala2
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/typer/Inferencing.scala b/src/dotty/tools/dotc/typer/Inferencing.scala
index 50aa6c8d0..154fdcbd2 100644
--- a/src/dotty/tools/dotc/typer/Inferencing.scala
+++ b/src/dotty/tools/dotc/typer/Inferencing.scala
@@ -148,7 +148,7 @@ object Inferencing {
def fullyDefinedType(tp: Type, what: String, pos: Position)(implicit ctx: Context) =
if (isFullyDefined(tp, ForceDegree.all)) tp
- else errorType(i"internal error: type of $what $tp is not fully defined", pos)
+ else throw new Error(i"internal error: type of $what $tp is not fully defined, pos = $pos") // !!! DEBUG
private class IsFullyDefinedAccumulator(force: ForceDegree.Value)(implicit ctx: Context) extends TypeAccumulator[Boolean] {
def traverse(tp: Type): Boolean = apply(true, tp)
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 5142f7360..1e84fad65 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -511,7 +511,7 @@ class Typer extends Namer with Applications with Implicits {
if (!mt.isDependent) mt.toFunctionType
else throw new Error(s"internal error: cannot turn dependent method type $mt into closure, position = ${tree.pos}") // !!! DEBUG. Eventually, convert to an error?
case tp =>
- errorType(i"internal error: closing over non-method $tp", tree.pos)
+ throw new Error(i"internal error: closing over non-method $tp, pos = ${tree.pos}")
}
cpy.Closure(tree, env1, meth1, EmptyTree).withType(ownType)
}