More detailed error message for EA-77641
This commit is contained in:
@@ -58,8 +58,12 @@ class PseudocodeImpl(override val correspondingElement: KtElement) : Pseudocode
|
||||
}
|
||||
|
||||
fun resolveToInstruction(): Instruction {
|
||||
assert(targetInstructionIndex != null)
|
||||
return mutableInstructionList[targetInstructionIndex!!]
|
||||
val index = targetInstructionIndex
|
||||
if (index == null || index >= mutableInstructionList.size) {
|
||||
error("resolveToInstruction: incorrect index $index for label $name " +
|
||||
"in subroutine ${correspondingElement.text} with instructions $mutableInstructionList")
|
||||
}
|
||||
return mutableInstructionList[index]
|
||||
}
|
||||
|
||||
fun copy(newLabelIndex: Int): PseudocodeLabel {
|
||||
|
||||
Reference in New Issue
Block a user