Skip to content

Instantly share code, notes, and snippets.

@yenerm
Last active May 17, 2020 22:51
Show Gist options
  • Save yenerm/1be967f3bd088334ec90cff731d1c92b to your computer and use it in GitHub Desktop.
Save yenerm/1be967f3bd088334ec90cff731d1c92b to your computer and use it in GitHub Desktop.
Decompiled Java
public final void call() {
float value = 123643.0F;
int $i$f$calculate = false;
KClass var5 = Reflection.getOrCreateKotlinClass(Integer.class);
Integer var10000;
if (Intrinsics.areEqual(var5, Reflection.getOrCreateKotlinClass(Float.TYPE))) {
var10000 = (Integer)value;
} else {
if (!Intrinsics.areEqual(var5, Reflection.getOrCreateKotlinClass(Integer.TYPE))) {
throw (Throwable)(new IllegalStateException("Only works with Float and Int"));
}
var10000 = (int)value;
}
int intCall = ((Number)var10000).intValue(); // Integer is used!!
int $i$f$calculate = false;
KClass var6 = Reflection.getOrCreateKotlinClass(Float.class);
Float var8;
if (Intrinsics.areEqual(var6, Reflection.getOrCreateKotlinClass(Float.TYPE))) {
var8 = value;
} else {
if (!Intrinsics.areEqual(var6, Reflection.getOrCreateKotlinClass(Integer.TYPE))) {
throw (Throwable)(new IllegalStateException("Only works with Float and Int"));
}
var8 = (Float)(int)value;
}
float floatCall = ((Number)var8).floatValue(); // Float is used!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment