feat: add MutableMethod.getInstructions extension function

This commit is contained in:
oSumAtrIX 2023-08-02 00:11:56 +02:00
parent 1790f0d706
commit fae4029cfc
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4

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
}