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 {
|
fun resolveToInstruction(): Instruction {
|
||||||
assert(targetInstructionIndex != null)
|
val index = targetInstructionIndex
|
||||||
return mutableInstructionList[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 {
|
fun copy(newLabelIndex: Int): PseudocodeLabel {
|
||||||
|
|||||||
Reference in New Issue
Block a user