feat: add MutableMethod.getInstructions extension function

This commit is contained in:
oSumAtrIX
2023-08-02 00:11:56 +02:00
parent 1790f0d706
commit fae4029cfc

View File

@ -323,4 +323,10 @@ object InstructionExtensions {
*/
@Suppress("UNCHECKED_CAST")
fun <T> MutableMethod.getInstruction(index: Int): T = implementation!!.getInstruction<T>(index)
/**
* Get the instructions of a method.
* @return The instructions.
*/
fun MutableMethod.getInstructions(): MutableList<BuilderInstruction> = implementation!!.instructions
}