mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2024-11-10 01:01:56 +01:00
fix: Use a checked cast by reifying the generic type parameter
This commit is contained in:
parent
a627510edf
commit
f7a296e1f1
1 changed files with 1 additions and 1 deletions
|
@ -115,7 +115,7 @@ fun BytecodeContext.traverseClassHierarchy(targetClass: MutableClass, callback:
|
|||
* if the [Instruction] is not a [ReferenceInstruction] or the [Reference] is not of type [T].
|
||||
* @see ReferenceInstruction
|
||||
*/
|
||||
fun <T : Reference> Instruction.getReference() = (this as? ReferenceInstruction)?.reference as? T
|
||||
inline fun <reified T : Reference> Instruction.getReference() = (this as? ReferenceInstruction)?.reference as? T
|
||||
|
||||
/**
|
||||
* Get the index of the first [Instruction] that matches the predicate.
|
||||
|
|
Loading…
Reference in a new issue