Skip to content

Commit c7435ba

Browse files
ivandev0TeamCityServer
authored and
TeamCityServer
committed
Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason behind this change is that `WITH_STDLIB` directive better describes its meaning, specifically it will add kotlin stdlib to test's classpath.
1 parent 960ba3f commit c7435ba

File tree

4,318 files changed

+4328
-4326
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,318 files changed

+4328
-4326
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
val p : UInt = <expr>42u</expr>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
// DO_NOT_CHECK_SYMBOL_RESTORE
33

44
// class: kotlin/Int
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
// class: kotlin/Function2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
// callable: kotlin/collections/listOf
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
// class: kotlin/io/FileWalkDirection

analysis/analysis-api/testData/symbols/symbolByReference/constructorViaTypeAlias.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
// DO_NOT_CHECK_SYMBOL_RESTORE
33

44
fun x() {

analysis/low-level-api-fir/testdata/diagnosticTraversalCounter/lambda.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
val x = run {
44
val inLambda = 10

compiler/fir/analysis-tests/testData/resolve/annotationUsedAsAnnotationArgument.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
@Target(AnnotationTarget.EXPRESSION)
44
@Retention(AnnotationRetention.SOURCE)

compiler/fir/analysis-tests/testData/resolve/expresssions/annotations.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
@Retention(AnnotationRetention.SOURCE)
44
@Target(AnnotationTarget.EXPRESSION)

compiler/fir/analysis-tests/testData/resolve/extendedCheckers/ArrayEqualityCanBeReplacedWithEquals.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
fun foo(p: Int) {
44
val a = arrayOf(1, 2, 3)

compiler/fir/analysis-tests/testData/resolve/extendedCheckers/CanBeValChecker.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
import kotlin.reflect.KProperty
44
import kotlin.properties.Delegates
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
val foo = Byte.MAX_VALUE.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toByte()<!>
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
val foo = 'a'.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toChar()<!>
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
val foo = 1.1.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toDouble()<!>
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
val foo = 1.1f.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toFloat()<!>
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
val foo = 1.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toInt()<!>
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
val foo = Long.MAX_VALUE.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toLong()<!>

compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantCallOfConversionMethod/nullable.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
// IS_APPLICABLE: false
33
fun foo(s: String?) {
44
val <!UNUSED_VARIABLE!>t<!>: String = s.toString()

compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantCallOfConversionMethod/nullable2.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// IS_APPLICABLE: false
2-
// WITH_RUNTIME
2+
// WITH_STDLIB
33
data class Foo(val name: String)
44

55
fun nullable2(foo: Foo?) {

compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantCallOfConversionMethod/safeString.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
fun test() {
44
val foo: String? = null

compiler/fir/analysis-tests/testData/resolve/extendedCheckers/RedundantCallOfConversionMethod/safeString2.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
data class Foo(val name: String)
33

44
fun test(foo: Foo?) {
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
val foo = Short.MAX_VALUE.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toShort()<!>
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
val foo = "".<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toString()<!>
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
// IS_APPLICABLE: false
33
val foo = 1.toLong()
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
fun test(i: UByte) {
33
val <!UNUSED_VARIABLE!>foo<!> = i.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toUByte()<!>
44
}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
fun test(i: UInt) {
33
val <!UNUSED_VARIABLE!>foo<!> = i.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toUInt()<!>
44
}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
fun test(i: ULong) {
33
val <!UNUSED_VARIABLE!>foo<!> = i.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toULong()<!>
44
}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
fun test(i: UShort) {
33
val <!UNUSED_VARIABLE!>foo<!> = i.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toUShort()<!>
44
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
val foo = ""
33
val bar = foo.<!REDUNDANT_CALL_OF_CONVERSION_METHOD!>toString()<!>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
val list1: List<Int> = listOf(1)
44
val list = list1.<!USELESS_CALL_ON_NOT_NULL!>orEmpty()<!>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
val list1: List<Int> = listOf(1)
44
val list = list1.<!USELESS_CALL_ON_NOT_NULL!>orEmpty()<!>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
val list1: List<Int> = listOf(1)
44
val list = list1.<!USELESS_CALL_ON_NOT_NULL!>orEmpty()<!>.map { "$it" }
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
val s: String? = ""
44
val blank = s.isNullOrBlank()
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
val s = ""
44
val empty = s.<!USELESS_CALL_ON_NOT_NULL!>isNullOrEmpty()<!>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
val s: String? = null
44
val empty = s.isNullOrEmpty()
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
val s: String? = ""
44
val empty = s?.<!USELESS_CALL_ON_NOT_NULL!>isNullOrEmpty()<!>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
val list: List<String>? = null
44
val empty = list.orEmpty()
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
val list1: List<Int>? = listOf(1)
44
val list = list1?.<!USELESS_CALL_ON_NOT_NULL!>orEmpty()<!>

compiler/fir/analysis-tests/testData/resolve/extendedCheckers/UselessCallOnNotNullChecker/Sequence.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
fun test(s: Sequence<Int>) {
44
val <!UNUSED_VARIABLE!>foo<!> = s.<!USELESS_CALL_ON_NOT_NULL!>orEmpty()<!>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
val s = ""
44
val s1 = s.<!USELESS_CALL_ON_NOT_NULL!>orEmpty()<!>

compiler/fir/analysis-tests/testData/resolve/extendedCheckers/canBeReplacedWithOperatorAssignment/flexibleTypeBug.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
fun foo() {
33
var list1 = java.util.Collections.emptyList<String>()
44
val list2 = listOf("b")

compiler/fir/analysis-tests/testData/resolve/extendedCheckers/canBeReplacedWithOperatorAssignment/list.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
fun foo() {
33
var list = listOf(1, 2, 3)
44
// Should not be highlighted because it's the way we use to say explicitly

compiler/fir/analysis-tests/testData/resolve/extendedCheckers/canBeReplacedWithOperatorAssignment/mutableList.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
fun foo() {
44
var listVar = mutableListOf(1, 2, 3)

compiler/fir/analysis-tests/testData/resolve/extendedCheckers/emptyRangeChecker/NoWarning.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
fun foo() {
44
for (i in 1..2) { }

compiler/fir/analysis-tests/testData/resolve/extendedCheckers/emptyRangeChecker/Warning.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22

33
fun foo() {
44
for (i in <!EMPTY_RANGE!>2..1<!>) { }

compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/FunctionTypeInJava.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
// FILE: JavaClass.java
33
public class JavaClass {
44
public static void foo1(kotlin.jvm.functions.Function0<Integer> x) {}

compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/branches.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
fun foo(a: Int, b: Int) = if (a > b) a else b
33

44
fun bar(a: Double, b: Double): Double {

compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/calls.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
infix fun Int.distance(y: Int) = this + y
33

44
fun test(): Int = 3 distance 4

compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/classReference.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//WITH_RUNTIME
1+
// WITH_STDLIB
22
package test
33

44
class A

compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/lambda.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
data class Tuple(val x: Int, val y: Int)
33

44
inline fun use(f: (Tuple) -> Int) = f(Tuple(1, 2))

compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/modifications.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
fun simple() {
33
var x = 10
44
x += 20

compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/try.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
fun some() {
33
try {
44
throw KotlinNullPointerException()

compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/unary.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
fun test() {
33
var x = 0
44
val x1 = x++

compiler/fir/raw-fir/psi2fir/testData/rawBuilder/expressions/while.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// WITH_RUNTIME
1+
// WITH_STDLIB
22
fun foo(limit: Int) {
33
var k = 0
44
some@ while (k < limit) {

compiler/testData/asJava/lightClasses/JvmNameOnMember.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// C
2-
// WITH_RUNTIME
2+
// WITH_STDLIB
33
class C {
44
@JvmName("myFun")
55
fun g(c: C) {

compiler/testData/asJava/lightClasses/JvmStatic.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// A
2-
// WITH_RUNTIME
2+
// WITH_STDLIB
33

44
class A {
55
companion object {

compiler/testData/asJava/lightClasses/compilationErrors/ActualTypeAliasCustomJvmPackageName.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// a.b.c.ActualTypeAliasCustomJvmPackageNameKt
2-
// WITH_RUNTIME
2+
// WITH_STDLIB
33
@file:JvmPackageName("a.b.c")
44
package p
55

compiler/testData/asJava/lightClasses/compilationErrors/AllInlineOnly.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// p.AllInlineOnly
2-
// WITH_RUNTIME
2+
// WITH_STDLIB
33
@file:kotlin.jvm.JvmMultifileClass
44
@file:kotlin.jvm.JvmName("AllInlineOnly")
55

compiler/testData/asJava/lightClasses/compilationErrors/AnnotationModifiers.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// A
2-
// WITH_RUNTIME
2+
// WITH_STDLIB
33
class A {
44
@Synchronized
55
@Strictfp

compiler/testData/asJava/lightClasses/compilationErrors/JvmPackageName.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// a.b.c.JvmPackageNameKt
2-
// WITH_RUNTIME
2+
// WITH_STDLIB
33
@file:JvmPackageName("a.b.c")
44
package p
55

compiler/testData/asJava/lightClasses/compilationErrors/WrongAnnotations.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// A
2-
// WITH_RUNTIME
2+
// WITH_STDLIB
33

44
class A {
55
companion object {

compiler/testData/asJava/lightClasses/facades/AllPrivate.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// p.AllPrivate
2-
// WITH_RUNTIME
2+
// WITH_STDLIB
33
@file:kotlin.jvm.JvmMultifileClass
44
@file:kotlin.jvm.JvmName("AllPrivate")
55

compiler/testData/asJava/lightClasses/facades/MultiFile.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// test.MultiFile
2-
// WITH_RUNTIME
2+
// WITH_STDLIB
33
@file:JvmMultifileClass
44
@file:JvmName("MultiFile")
55

compiler/testData/asJava/lightClasses/facades/SingleJvmClassName.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//NewName
2-
// WITH_RUNTIME
2+
// WITH_STDLIB
33
@file:JvmName("NewName")
44

55
fun foo() {

compiler/testData/asJava/lightClasses/nullabilityAnnotations/JvmOverloads.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// C
2-
// WITH_RUNTIME
2+
// WITH_STDLIB
33

44
class C {
55
@[kotlin.jvm.JvmOverloads] public fun foo(o: String = "O", o1: String, o3: String = "K", o4: String?): String {

0 commit comments

Comments
 (0)