Skip to content

Instantly share code, notes, and snippets.

View s1monw1's full-sized avatar
☁️
Hello, cloud.

Simon Wirtz s1monw1

☁️
Hello, cloud.
View GitHub Profile
//File.kt
fun foobar(){}
public static final void take_KR2Ufmw(@Nullable WrappedInt w) {
if (w != null) {
int var1 = w.unbox-impl();
System.out.println(var1);
}
}
public static final void main() {
take-KR2Ufmw(WrappedInt.box-impl(WrappedInt.constructor-impl(5)));
}
inline class WrappedInt(val value: Int)
fun take(w: WrappedInt?) {
if (w != null) println(w.value)
}
fun main() {
take(WrappedInt(5))
}
fun take(w: WrappedInt) = println(w.value)
fun take(v: Int) = println(v.value)
public static final void take_wIOJKEE(int w) {
System.out.println(w);
}
public static final void main() {
int inlined = WrappedInt.constructor-impl(5);
take-wIOJKEE(inlined);
}
fun take(w: WrappedInt) {
println(w.value)
}
fun main() {
val inlined = WrappedInt(5)
take(inlined)
}
public final class WrappedInt {
private final int value;
public final int getValue() { return this.value; }
// $FF: synthetic method
private WrappedInt(int value) { this.value = value; }
public static int constructor_impl(int value) { return value; }
@JvmInline
public value class UInt @PublishedApi internal constructor(@PublishedApi internal val data: Int) : Comparable<UInt>
@JvmInline
value class JsonString(val value: String)
inline fun <reified T> JsonString.asJson() =
jacksonObjectMapper().readValue<T>(this.value)
val jsonString = """{ "x":200, "y":300 }"""
val data: JsonData = jsonString.asJson()