mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 15:53:55 +00:00
54 lines
891 B
Kotlin
Vendored
54 lines
891 B
Kotlin
Vendored
package k
|
|
|
|
public class Class() {
|
|
public val prop: Int = 0
|
|
fun function() = 1
|
|
}
|
|
|
|
public enum class EnumClass {
|
|
ENTRY
|
|
}
|
|
|
|
|
|
public fun topLevelFun() {
|
|
}
|
|
|
|
public class ClassWithClassObject {
|
|
companion object {
|
|
fun f() = 1
|
|
}
|
|
}
|
|
|
|
public object KotlinObject {
|
|
fun f() = 1
|
|
}
|
|
|
|
public interface StaticFieldInClassObjectInTrait {
|
|
companion object {
|
|
public const val XX: String = "xx"
|
|
}
|
|
}
|
|
|
|
object PlatformStaticFun {
|
|
@JvmStatic
|
|
fun test() {
|
|
}
|
|
}
|
|
|
|
interface TraitNoImpl {
|
|
fun foo()
|
|
}
|
|
|
|
public class TraitWithDelegatedNoImpl(f: TraitNoImpl): TraitNoImpl by f
|
|
|
|
interface TraitWithImpl {
|
|
fun foo() = 1
|
|
}
|
|
|
|
public class TraitWithDelegatedWithImpl(f: TraitWithImpl) : TraitWithImpl by f
|
|
|
|
kotlin.jvm.jvmOverloads
|
|
public fun withJvmOverloads(i: Int, b: Boolean = false, s: String="hello") {}
|
|
|
|
annotation class KAnno(val c: Int = 4, val d: String)
|