Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save shahsurajk/15ba8540fe26bc0d467a90dc2d6d9c86 to your computer and use it in GitHub Desktop.
Save shahsurajk/15ba8540fe26bc0d467a90dc2d6d9c86 to your computer and use it in GitHub Desktop.
Decomplied reified inlined with generic parameter
public static final void main() {
Object value$iv = "String";
int value$iv = false;
String var3 = String.class.getSimpleName(); // the compiler adds it local here, thus making it persist post-compile. This value is then checked in the line below.
String whoAmI$iv = Intrinsics.areEqual(var3, Integer.TYPE.getSimpleName()) ? "I am an Int" : (Intrinsics.areEqual(var3, String.class.getSimpleName()) ? "I am Unknown" : "I am Groot!");
boolean $i$f$myGenericFunction = false;
System.out.println(whoAmI$iv);
value$iv = true;
$i$f$myGenericFunction = false;
whoAmI$iv = Integer.class.getSimpleName(); // here as well.
String whoAmI$iv = Intrinsics.areEqual(whoAmI$iv, Integer.TYPE.getSimpleName()) ? "I am an Int" : (Intrinsics.areEqual(whoAmI$iv, String.class.getSimpleName()) ? "I am Unknown" : "I am Groot!");
boolean var7 = false;
System.out.println(whoAmI$iv);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment