Skip to content

Commit

Permalink
feat: add MutableMethod.getInstructions extension function
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Aug 1, 2023
1 parent 1790f0d commit fae4029
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -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
}

0 comments on commit fae4029

Please sign in to comment.