Skip to content

Commit ac0a0c1

Browse files
committed
Move abort
1 parent b868291 commit ac0a0c1

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

compiler/src/dotty/tools/backend/jvm/BCodeHelpers.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,11 @@ trait BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
929929
getGenericSignatureHelper(sym, moduleClass, memberTpe).orNull
930930
else null
931931
}
932+
933+
def abort(msg: String): Nothing = {
934+
ctx.error(msg)
935+
throw new RuntimeException(msg)
936+
}
932937
}
933938

934939
object BCodeHelpers {

compiler/src/dotty/tools/backend/jvm/BCodeIdiomatic.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,11 @@ trait BCodeIdiomatic {
584584
jmethod.visitTypeInsn(Opcodes.CHECKCAST, tk.classOrArrayType)
585585
}
586586

587+
def abort(msg: String): Nothing = {
588+
ctx.error(msg)
589+
throw new RuntimeException(msg)
590+
}
591+
587592
} // end of class JCodeMethodN
588593

589594
/* Constant-valued val-members of JCodeMethodN at the companion object, so as to avoid re-initializing them multiple times. */

compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,6 @@ class DottyBackendInterface(val outputDirectory: AbstractFile, val superCallsMap
5050
ctx.requiredModule(className)
5151
}
5252

53-
def abort(msg: String): Nothing = {
54-
ctx.error(msg)
55-
throw new RuntimeException(msg)
56-
}
57-
5853
private val desugared = new java.util.IdentityHashMap[Type, tpd.Select]
5954

6055
def desugarIdentBI(i: Ident): Option[tpd.Select] = {

0 commit comments

Comments
 (0)