I hereby claim:
- I am udalov on github.
- I am udalov (https://keybase.io/udalov) on keybase.
- I have a public key whose fingerprint is 40BF FCAA AA01 B591 916C AAB6 8DA6 620F 79E0 B972
To claim this, I am signing this object:
data class Result(val x: Int, val y: String) | |
fun computeSomething(): Result { | |
return Result(42, "") | |
} | |
fun main() { | |
val (x, y) = computeSomething() | |
println(x) | |
println(y) |
class A() { | |
var state: Any | |
} | |
fun A(state: Any): A { | |
val a = A() | |
a.state = state | |
return a | |
} |
#include <cstdio> | |
#include <vector> | |
#include <sndfile.h> | |
using namespace std; | |
int main() { | |
SF_INFO sfinfo; | |
const int BUF_LEN = 2048; |
class A { void foo() {} } | |
class a { } | |
public class Main { | |
public static void main(String[] args) { | |
new A().foo(); | |
} | |
} |
@file:suppress("UNCHECKED_CAST", "BASE_WITH_NULLABLE_UPPER_BOUND", "UNUSED_PARAMETER") | |
interface KElement | |
// Class, package, type | |
interface KDeclarationContainer : KElement { | |
val allMembers: Collection<KElement> | |
} |
I hereby claim:
To claim this, I am signing this object:
import java.lang.reflect.* | |
import kotlin.reflect.KClass | |
import kotlin.reflect.KType | |
import kotlin.reflect.KTypeProjection | |
import kotlin.reflect.KVariance | |
import kotlin.reflect.full.createType | |
// --- Interface --- | |
inline fun <reified T : Any> getKType(): KType = |
import org.jetbrains.kotlin.serialization.jvm.* | |
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") | |
fun loadOriginName(className: String) { | |
val metadata = Class.forName(className).declaredAnnotations | |
.filter { it.annotationClass.qualifiedName == "kotlin.Metadata" } | |
.single() as Metadata | |
if (metadata.k == 3 && metadata.d1.isNotEmpty()) { | |
// Synthetic classes generated for lambdas/coroutines |
#!/usr/bin/env python3 | |
import atexit, os, re, shutil, subprocess, sys, time | |
from pathlib import Path | |
def to_str(buf): | |
return "".join(map(chr, buf)) | |
def dump_stdout_stderr(f, result): | |
f.write("=== STDOUT ===\n\n") |