mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
This commit partially solves a problem of a circular module dependency between tests of 'kotlin.compiler-plugins.kotlinx-serialization.common' module, tests of 'kotlin.idea.tests' module, and tests of 'kotlin.features-trainer'. GitOrigin-RevId: e969138bf215202dbe077950d12d64510c6fd5e1
71 lines
1.9 KiB
Kotlin
71 lines
1.9 KiB
Kotlin
object Main {
|
|
private const val field = 322
|
|
|
|
@JvmStatic
|
|
fun main(args: Array<String>) {
|
|
val staticClass = StaticClass()
|
|
val abc = 3
|
|
val bcd = 5 + field
|
|
function(true);
|
|
if (abc < bcd && function(true)) {
|
|
println(abc * bcd - field)
|
|
}
|
|
StaticClass.main(null as Array<String>)
|
|
}
|
|
|
|
private fun function(arg: Boolean): Boolean {
|
|
return arg
|
|
}
|
|
|
|
private class StaticClass {
|
|
fun cyclesFunction(ere: Int): Int {
|
|
var i = 10
|
|
for (j in 0 until i) {
|
|
val res = j - j + j
|
|
println(res - j)
|
|
}
|
|
i += 10
|
|
while (i > 0) {
|
|
println(i * i)
|
|
i--
|
|
}
|
|
if (true) { i++ }
|
|
return i
|
|
}
|
|
|
|
fun stringFunction(sss: String?): String {
|
|
val builder = StringBuilder()
|
|
builder.append("433" + "322" + 'e' + "wrwer")
|
|
val str = builder.toString() + '2' + "123"
|
|
return builder.toString() + "322" + "erer" +
|
|
"true" + "or false" + str
|
|
}
|
|
|
|
companion object {
|
|
@JvmStatic
|
|
fun main(args: Array<String>) {
|
|
function(false)
|
|
}
|
|
|
|
private fun function(arg: Boolean): Boolean {
|
|
return arg && function(function && function || arg)
|
|
}
|
|
|
|
private const val function = true
|
|
}
|
|
|
|
fun selfReturningFunction(arg: Int): StaticClass {
|
|
return this
|
|
}
|
|
|
|
var nonStaticField = "123123123"
|
|
|
|
init {
|
|
val instance = StaticClass()
|
|
val ss = instance.selfReturningFunction(322).selfReturningFunction(instance.cyclesFunction(0))
|
|
.selfReturningFunction(1).nonStaticField
|
|
}
|
|
}
|
|
}
|
|
|
|
const val globalVariable: Int = 322 |