3f14e74b08
Comma must present now between enum entries, semicolon between last entry & first member, constructor calls must be without colons / specifiers. A swarm of tests fixed accordingly.
34 lines
505 B
Kotlin
Vendored
34 lines
505 B
Kotlin
Vendored
trait Foo {
|
|
}
|
|
|
|
val f = { (a: Int, b: Int) -> a + b }
|
|
|
|
class A private()
|
|
|
|
val x = fun foo(x: String) { }
|
|
|
|
fun foo() {
|
|
@loop
|
|
for (i in 1..100) {
|
|
val v = oldFun2(i as Int) as Int
|
|
/* comment */
|
|
continue@loop
|
|
}
|
|
|
|
oldFun1(oldFun2(10))
|
|
}
|
|
|
|
fun unnecessarySafeCall(x: String) {
|
|
x?.length()
|
|
}
|
|
|
|
fun unnecessaryExclExcl(x: String) {
|
|
x!!.length()
|
|
}
|
|
|
|
fun unnecessaryCast(x: String) = x as String
|
|
|
|
fun unnecessaryElvis(x: String) = x ?: ""
|
|
|
|
JavaAnn(1, "abc") class MyClass
|