(f : (Int) -> Int)
-fun testFun(a : Int) = 12
+open class ToResolve(f : (Int) -> Int)
+fun testFun(a : Int) = 12
class TestSome {
companion object : ToResolve<P>({testFun(it)}) {
}
-}
\ No newline at end of file
+}
diff --git a/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.kt b/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.kt
index 9e882d8676f..0ff5548191b 100644
--- a/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.kt
+++ b/compiler/testData/diagnostics/tests/classObjects/invisibleClassObjects.kt
@@ -48,4 +48,4 @@ fun test() {
a.C.baz()
}
-fun f(unused: Any) {}
+fun f(unused: Any) {}
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt b/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt
index a0006c690cd..977712b1360 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsWithVarargs.kt
@@ -37,5 +37,5 @@ annotation class AnnArray(val a: Array)
@AnnArray(*["/"])
fun testArray() {}
-@Ann1([""])
+@Ann1([""])
fun testVararg() {}
diff --git a/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt b/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt
index c304ad29e5a..81f8fb4128c 100644
--- a/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt
+++ b/compiler/testData/diagnostics/tests/collectionLiterals/noCollectionLiterals.kt
@@ -6,11 +6,11 @@ fun test(): Array {
foo([""])
- val p = [1, 2] + [3, 4]
+ val p = [1, 2] + [3, 4]
return [1, 2]
}
-fun foo(a: Array = [""]) {}
+fun foo(a: Array = [""]) {}
class A(val a: Array = [])
diff --git a/compiler/testData/diagnostics/tests/controlStructures/ForbidStatementAsDirectFunctionBody.kt b/compiler/testData/diagnostics/tests/controlStructures/ForbidStatementAsDirectFunctionBody.kt
index aa884b4de23..c3a4ed842b0 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/ForbidStatementAsDirectFunctionBody.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/ForbidStatementAsDirectFunctionBody.kt
@@ -1,11 +1,10 @@
-
fun foo1() = while (b()) {}
-fun foo2() = for (i in 10) {}
+fun foo2() = for (i in 10) {}
fun foo3() = when (b()) {
true -> 1
else -> 0
}
-fun b(): Boolean = true
\ No newline at end of file
+fun b(): Boolean = true
diff --git a/compiler/testData/diagnostics/tests/controlStructures/ifToAnyDiscriminatingUsages.kt b/compiler/testData/diagnostics/tests/controlStructures/ifToAnyDiscriminatingUsages.kt
index 13910df8e7a..c622c657b29 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/ifToAnyDiscriminatingUsages.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/ifToAnyDiscriminatingUsages.kt
@@ -23,7 +23,7 @@ fun testResultOfAnonFun1() =
fun testResultOfAnonFun2() =
run(fun () {
- if (true) 42 else println()
+ if (true) 42 else println()
})
fun testReturnFromAnonFun() =
diff --git a/compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt b/compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt
index 74a3a404a95..ed88ad9c5a4 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/ifWhenWithoutElse.kt
@@ -27,17 +27,17 @@ val wxx5 = idUnit(when { true -> when { true -> 42 }
val wxx7 = "" + when { true -> 42 }
-val fn1 = { if (true) 42 }
+val fn1 = { if (true) 42 }
val fn2 = { if (true) mlist.add() }
val fn3 = { if (true) work() }
val fn4 = { when { true -> 42 } }
val fn5 = { when { true -> mlist.add() } }
val fn6 = { when { true -> work() } }
-val ufn1: () -> Unit = { if (true) 42 }
+val ufn1: () -> Unit = { if (true) 42 }
val ufn2: () -> Unit = { if (true) mlist.add() }
val ufn3: () -> Unit = { if (true) work() }
-val ufn4: () -> Unit = { when { true -> 42 } }
+val ufn4: () -> Unit = { when { true -> 42 } }
val ufn5: () -> Unit = { when { true -> mlist.add() } }
val ufn6: () -> Unit = { when { true -> work() } }
@@ -83,4 +83,3 @@ fun foo2() {
}
}
}
-
diff --git a/compiler/testData/diagnostics/tests/controlStructures/improperElseInExpression.kt b/compiler/testData/diagnostics/tests/controlStructures/improperElseInExpression.kt
index 8d2405da327..2642a097384 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/improperElseInExpression.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/improperElseInExpression.kt
@@ -10,7 +10,7 @@ fun example() {
val f = if (true) true else {}
{
- if (true) true
+ if (true) true
}();
{
diff --git a/compiler/testData/diagnostics/tests/controlStructures/kt1075.kt b/compiler/testData/diagnostics/tests/controlStructures/kt1075.kt
index e7adc4b5300..5ec810f7df0 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/kt1075.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/kt1075.kt
@@ -6,7 +6,7 @@ package kt1075
fun foo(b: String) {
if (b in 1..10) {} //type mismatch
when (b) {
- in 1..10 -> 1 //no type mismatch, but it should be here
- else -> 2
+ in 1..10 -> 1 //no type mismatch, but it should be here
+ else -> 2
}
}
diff --git a/compiler/testData/diagnostics/tests/controlStructures/kt657.kt b/compiler/testData/diagnostics/tests/controlStructures/kt657.kt
index 3ea9283f14b..d37750959f5 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/kt657.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/kt657.kt
@@ -1,7 +1,7 @@
//KT-657 Semantic checks for when without condition
package kt657
-class Pair(a: A, b: B)
+class Pair(a: A, b: B)
fun foo() =
when {
diff --git a/compiler/testData/diagnostics/tests/controlStructures/kt770.kt351.kt735_StatementType.kt b/compiler/testData/diagnostics/tests/controlStructures/kt770.kt351.kt735_StatementType.kt
index f1a587fb3e9..666c51ccf03 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/kt770.kt351.kt735_StatementType.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/kt770.kt351.kt735_StatementType.kt
@@ -27,8 +27,8 @@ fun foo() {
z = 34
}
}
- val f: ()-> Int = r
- val g: ()-> Any = r
+ val f: ()-> Int = r
+ val g: ()-> Any = r
}
//KT-735 Statements without braces are prohibited on the right side of when entries.
@@ -48,27 +48,27 @@ fun test1() { while(true) {} }
fun test2(): Unit { while(true) {} }
fun testCoercionToUnit() {
- val simple: ()-> Unit = {
- 41
+ val simple: ()-> Unit = {
+ 41
}
- val withIf: ()-> Unit = {
+ val withIf: ()-> Unit = {
if (true) {
- 3
+ 3
} else {
- 45
+ 45
}
}
val i = 34
- val withWhen : () -> Unit = {
+ val withWhen : () -> Unit = {
when(i) {
1 -> {
val d = 34
- "1"
+ "1"
doSmth(d)
}
- 2 -> '4'
- else -> true
+ 2 -> '4'
+ else -> true
}
}
@@ -80,54 +80,54 @@ fun testCoercionToUnit() {
45
}
}
- val f : () -> String = checkType
+ val f : () -> String = checkType
}
-fun doSmth(i: Int) {}
+fun doSmth(i: Int) {}
fun testImplicitCoercion() {
val d = 21
var z = 0
- var i = when(d) {
+ var i = when(d) {
3 -> null
- 4 -> { val z = 23 }
+ 4 -> { val z = 23 }
else -> z = 20
}
- var u = when(d) {
- 3 -> { z = 34 }
- else -> z--
+ var u = when(d) {
+ 3 -> { z = 34 }
+ else -> z--
}
- var iff = if (true) {
- z = 34
+ var iff = if (true) {
+ z = 34
}
- val g = if (true) 4
- val h = if (false) 4 else {}
+ val g = if (true) 4
+ val h = if (false) 4 else {}
bar(if (true) {
4
} else {
- z = 342
+ z = 342
})
}
-fun fooWithAnyArg(arg: Any) {}
-fun fooWithAnyNullableArg(arg: Any?) {}
+fun fooWithAnyArg(arg: Any) {}
+fun fooWithAnyNullableArg(arg: Any?) {}
fun testCoercionToAny() {
val d = 21
- val x1: Any = if (1>2) 1 else 2.0
- val x2: Any? = if (1>2) 1 else 2.0
- val x3: Any? = if (1>2) 1 else (if (1>2) null else 2.0)
+ val x1: Any = if (1>2) 1 else 2.0
+ val x2: Any? = if (1>2) 1 else 2.0
+ val x3: Any? = if (1>2) 1 else (if (1>2) null else 2.0)
fooWithAnyArg(if (1>2) 1 else 2.0)
fooWithAnyNullableArg(if (1>2) 1 else 2.0)
fooWithAnyNullableArg(if (1>2) 1 else (if (1>2) null else 2.0))
- val y1: Any = when(d) { 1 -> 1.0 else -> 2.0 }
- val y2: Any? = when(d) { 1 -> 1.0 else -> 2.0 }
- val y3: Any? = when(d) { 1 -> 1.0; 2 -> null; else -> 2.0 }
+ val y1: Any = when(d) { 1 -> 1.0 else -> 2.0 }
+ val y2: Any? = when(d) { 1 -> 1.0 else -> 2.0 }
+ val y3: Any? = when(d) { 1 -> 1.0; 2 -> null; else -> 2.0 }
fooWithAnyArg(when(d) { 1 -> 1.0 else -> 2.0 })
fooWithAnyNullableArg(when(d) { 1 -> 1.0 else -> 2.0 })
@@ -145,16 +145,16 @@ fun fooWithAnuNullableResult(s: String?, name: String, optional: Boolean): Any?
}
}
-fun bar(a: Unit) {}
+fun bar(a: Unit) {}
fun testStatementInExpressionContext() {
var z = 34
- val a1: Unit = z = 334
- val f = for (i in 1..10) {}
- if (true) return z = 34
+ val a1: Unit = z = 334
+ val f = for (i in 1..10) {}
+ if (true) return z = 34
return while (true) {}
}
fun testStatementInExpressionContext2() {
- val a2: Unit = while(true) {}
+ val a2: Unit = while(true) {}
}
diff --git a/compiler/testData/diagnostics/tests/controlStructures/kt786.kt b/compiler/testData/diagnostics/tests/controlStructures/kt786.kt
index 5d8ddba83e9..8fac094ccb0 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/kt786.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/kt786.kt
@@ -5,8 +5,8 @@ fun foo() : Int {
val d = 2
var z = 0
when(d) {
- 5, 3 -> z++
- else -> { z = -1000 }
+ 5, 3 -> z++
+ else -> { z = -1000 }
return z -> 34
}
}
@@ -15,7 +15,7 @@ fun foo() : Int {
fun fff(): Int {
var d = 3
when(d) {
- 4 -> 21
+ 4 -> 21
return 2 -> return 47
bar() -> 45
444 -> true
@@ -23,4 +23,4 @@ fun fff(): Int {
return 34
}
-fun bar(): Int = 8
\ No newline at end of file
+fun bar(): Int = 8
diff --git a/compiler/testData/diagnostics/tests/controlStructures/kt799.kt b/compiler/testData/diagnostics/tests/controlStructures/kt799.kt
index f1aa021f3cb..dc7a73f813d 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/kt799.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/kt799.kt
@@ -3,9 +3,9 @@
package kt799
fun test() {
- val a : Int = if (true) 6 else return // should be allowed
+ val a : Int = if (true) 6 else return // should be allowed
- val b = if (true) 6 else return // should be allowed
+ val b = if (true) 6 else return // should be allowed
doSmth(if (true) 3 else return)
@@ -19,7 +19,7 @@ val b = return 1
val c = doSmth(if (true) 3 else return)
-fun f(mi: Int = if (true) 0 else return) {}
+fun f(mi: Int = if (true) 0 else return) {}
-fun doSmth(i: Int) {
+fun doSmth(i: Int) {
}
diff --git a/compiler/testData/diagnostics/tests/controlStructures/lambdasInExclExclAndElvis.kt b/compiler/testData/diagnostics/tests/controlStructures/lambdasInExclExclAndElvis.kt
index f1af079ad20..56c4ce766e4 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/lambdasInExclExclAndElvis.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/lambdasInExclExclAndElvis.kt
@@ -11,6 +11,6 @@ fun test() {
{ } ?: 1
use({ 2 } ?: 1);
- 1 ?: { }
+ 1 ?: { }
use(1 ?: { })
}
diff --git a/compiler/testData/diagnostics/tests/controlStructures/tryReturnType.kt b/compiler/testData/diagnostics/tests/controlStructures/tryReturnType.kt
index 40149769d1b..99b44752f88 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/tryReturnType.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/tryReturnType.kt
@@ -21,7 +21,7 @@ fun bar() : Int =
""
}
finally {
- ""
+ ""
}
diff --git a/compiler/testData/diagnostics/tests/controlStructures/valVarLoopParameter.kt b/compiler/testData/diagnostics/tests/controlStructures/valVarLoopParameter.kt
index be09dd797d7..a1956f7f86d 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/valVarLoopParameter.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/valVarLoopParameter.kt
@@ -22,11 +22,11 @@ fun f() {
}
- for (val (i,j) in Coll()) {
+ for (val (i,j) in Coll()) {
}
- for (var (i,j) in Coll()) {
+ for (var (i,j) in Coll()) {
}
}
diff --git a/compiler/testData/diagnostics/tests/controlStructures/when.kt234.kt973.kt b/compiler/testData/diagnostics/tests/controlStructures/when.kt234.kt973.kt
index 313dbe03628..b46d887e1d4 100644
--- a/compiler/testData/diagnostics/tests/controlStructures/when.kt234.kt973.kt
+++ b/compiler/testData/diagnostics/tests/controlStructures/when.kt234.kt973.kt
@@ -3,7 +3,7 @@
package kt234_kt973
-class Pair(a: A, b: B)
+class Pair(a: A, b: B)
fun test(t : Pair) : Int {
when (t) {
@@ -21,7 +21,7 @@ fun test1(t : Pair) : Int {
}
//more tests
-fun t1(x: Int) = when(x) {
+fun t1(x: Int) = when(x) {
else -> 1
}
diff --git a/compiler/testData/diagnostics/tests/cyclicHierarchy/commonSupertypeForCyclicAndUsualTypes.kt b/compiler/testData/diagnostics/tests/cyclicHierarchy/commonSupertypeForCyclicAndUsualTypes.kt
index ab2fc7da140..e21856a33a7 100644
--- a/compiler/testData/diagnostics/tests/cyclicHierarchy/commonSupertypeForCyclicAndUsualTypes.kt
+++ b/compiler/testData/diagnostics/tests/cyclicHierarchy/commonSupertypeForCyclicAndUsualTypes.kt
@@ -4,5 +4,5 @@ open class B : A()
fun select(vararg xs: T): T = xs[0]
fun foo() {
- val x = select(A(), B(), "foo")
-}
\ No newline at end of file
+ val x = select(A(), B(), "foo")
+}
diff --git a/compiler/testData/diagnostics/tests/dataClasses/dataClassVarargParam.fir.kt b/compiler/testData/diagnostics/tests/dataClasses/dataClassVarargParam.fir.kt
deleted file mode 100644
index e9a4216042c..00000000000
--- a/compiler/testData/diagnostics/tests/dataClasses/dataClassVarargParam.fir.kt
+++ /dev/null
@@ -1,3 +0,0 @@
-data class My(val x: Int, vararg val y: String)
-
-data class Your(vararg z: String)
diff --git a/compiler/testData/diagnostics/tests/dataClasses/dataClassVarargParam.kt b/compiler/testData/diagnostics/tests/dataClasses/dataClassVarargParam.kt
index 46bf53f6f40..c4ada415980 100644
--- a/compiler/testData/diagnostics/tests/dataClasses/dataClassVarargParam.kt
+++ b/compiler/testData/diagnostics/tests/dataClasses/dataClassVarargParam.kt
@@ -1,3 +1,4 @@
+// FIR_IDENTICAL
data class My(val x: Int, vararg val y: String)
-data class Your(vararg z: String)
\ No newline at end of file
+data class Your(vararg z: String)
diff --git a/compiler/testData/diagnostics/tests/dataFlow/IsExpression.kt b/compiler/testData/diagnostics/tests/dataFlow/IsExpression.kt
index 2b33b708e80..17dbc80e501 100644
--- a/compiler/testData/diagnostics/tests/dataFlow/IsExpression.kt
+++ b/compiler/testData/diagnostics/tests/dataFlow/IsExpression.kt
@@ -1,4 +1,4 @@
-fun f(a: Boolean, b: Int) {}
+fun f(a: Boolean, b: Int) {}
fun foo(a: Any) {
f(a is Int, a)
diff --git a/compiler/testData/diagnostics/tests/dataFlow/WhenSubject.kt b/compiler/testData/diagnostics/tests/dataFlow/WhenSubject.kt
index e6cd7eab473..4650a6f833f 100644
--- a/compiler/testData/diagnostics/tests/dataFlow/WhenSubject.kt
+++ b/compiler/testData/diagnostics/tests/dataFlow/WhenSubject.kt
@@ -4,7 +4,7 @@ class BinOp(val operator : String) : Expr
fun test(e : Expr) {
if (e is BinOp) {
when (e.operator) {
- else -> 0
+ else -> 0
}
}
-}
\ No newline at end of file
+}
diff --git a/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassBase.kt b/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassBase.kt
index 566e118a22c..522b57dc8bb 100644
--- a/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassBase.kt
+++ b/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassBase.kt
@@ -1,4 +1,4 @@
-open class Base(x: String, y: Int)
+open class Base(x: String, y: Int)
fun test(x: Any, y: Int?) {
if (x !is String) return
@@ -7,4 +7,3 @@ fun test(x: Any, y: Int?) {
class Local: Base(x, y) {
}
}
-
diff --git a/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDefaultParameters.kt b/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDefaultParameters.kt
index a4fdfcf6e8c..617e7a0f018 100644
--- a/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDefaultParameters.kt
+++ b/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassDefaultParameters.kt
@@ -1,8 +1,7 @@
fun test(x: Any) {
if (x !is String) return
- class Local(s: String = x) {
+ class Local(s: String = x) {
fun foo(s: String = x): String = s
}
}
-
diff --git a/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInitializer.kt b/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInitializer.kt
index 9be2ebf0d6d..80c466738f6 100644
--- a/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInitializer.kt
+++ b/compiler/testData/diagnostics/tests/dataFlow/local/LocalClassInitializer.kt
@@ -13,4 +13,4 @@ fun f(a: Any?) {
interface B {
fun foo() {}
}
-open class X(b: B)
+open class X(b: B)
diff --git a/compiler/testData/diagnostics/tests/dataFlow/local/LocalObject.kt b/compiler/testData/diagnostics/tests/dataFlow/local/LocalObject.kt
index ff9561985a0..827ad8ffb0c 100644
--- a/compiler/testData/diagnostics/tests/dataFlow/local/LocalObject.kt
+++ b/compiler/testData/diagnostics/tests/dataFlow/local/LocalObject.kt
@@ -6,4 +6,4 @@ fun foo(x: Any?) {
}
}
-open class Base(s: String)
\ No newline at end of file
+open class Base(s: String)
diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionIdentifier.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionIdentifier.kt
index 8d07b8b532a..560341e80a4 100644
--- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionIdentifier.kt
+++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/BinaryExpressionIdentifier.kt
@@ -1,6 +1,6 @@
// !CHECK_TYPE
-infix fun Int.compareTo(o: Int) = 0
+infix fun Int.compareTo(o: Int) = 0
fun foo(a: Number): Int {
val result = (a as Int) compareTo a
@@ -12,4 +12,4 @@ fun bar(a: Number): Int {
val result = 42 compareTo (a as Int)
checkSubtype(a)
return result
-}
\ No newline at end of file
+}
diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ObjectExpression.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ObjectExpression.kt
index a17c535d1b8..a3a056d3dff 100644
--- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ObjectExpression.kt
+++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/ObjectExpression.kt
@@ -5,7 +5,7 @@ fun bar(x: Int): Int = x + 1
fun foo() {
val x: Int? = null
- val a = object {
+ val a = object {
fun baz() = bar(if (x == null) 0 else x)
fun quux(): Int = if (x == null) x else x
}
diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/kt5155WhenBranches.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/kt5155WhenBranches.kt
index 6748f092965..424f806cbff 100644
--- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/kt5155WhenBranches.kt
+++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/kt5155WhenBranches.kt
@@ -2,10 +2,10 @@
fun foo(s: String?) {
when {
- s == null -> 1
- s.foo() -> 2
- else -> 3
+ s == null -> 1
+ s.foo() -> 2
+ else -> 3
}
}
-fun String.foo() = true
\ No newline at end of file
+fun String.foo() = true
diff --git a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.kt b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.kt
index fe2cb6fae30..67b7e87d9ae 100644
--- a/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.kt
+++ b/compiler/testData/diagnostics/tests/dataFlowInfoTraversal/smartcasts/SmartcastsForStableIdentifiers.kt
@@ -20,34 +20,34 @@ class AClass() {
val x : Any? = 1
-fun Any?.vars(a: Any?) : Int {
+fun Any?.vars(a: Any?) : Int {
var b: Int = 0
if (example.ns.y is Int) {
- b = y
+ b = y
}
if (example.ns.y is Int) {
- b = example.ns.y
+ b = example.ns.y
}
if (Obj.y is Int) {
- b = Obj.y
+ b = Obj.y
}
if (example.Obj.y is Int) {
- b = Obj.y
+ b = Obj.y
}
if (AClass.y is Int) {
- b = AClass.y
+ b = AClass.y
}
if (example.AClass.y is Int) {
- b = AClass.y
+ b = AClass.y
}
if (x is Int) {
- b = x
+ b = x
}
if (example.x is Int) {
- b = x
+ b = x
}
if (example.x is Int) {
- b = example.x
+ b = example.x
}
return 1
}
@@ -71,16 +71,16 @@ open class C {
fun foo() {
var t : T? = null
if (this is T) {
- t = this
+ t = this
}
if (this is T) {
- t = this@C
+ t = this@C
}
if (this@C is T) {
- t = this
+ t = this
}
if (this@C is T) {
- t = this@C
+ t = this@C
}
}
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/ComponentFunctionReturnTypeMismatch.kt b/compiler/testData/diagnostics/tests/declarationChecks/ComponentFunctionReturnTypeMismatch.kt
index 71e9390c6d3..d06ff5a7dfa 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/ComponentFunctionReturnTypeMismatch.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/ComponentFunctionReturnTypeMismatch.kt
@@ -5,5 +5,5 @@ class A {
}
fun a(aa : A) {
- val (a: String, b1: String) = aa
+ val (a: String, b1: String) = aa
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/ConflictingAndRedundantProjections.kt b/compiler/testData/diagnostics/tests/declarationChecks/ConflictingAndRedundantProjections.kt
index 062569c59cf..746da40db8c 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/ConflictingAndRedundantProjections.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/ConflictingAndRedundantProjections.kt
@@ -3,18 +3,18 @@ class Out
class Inv
class X
-fun f1(p: In<in X>) {}
-fun f2(p: In<out X>) {}
-fun f3(p: In) {}
+fun f1(p: In<in X>) {}
+fun f2(p: In<out X>) {}
+fun f3(p: In) {}
-fun f4(p: Out<out X>) {}
-fun f5(p: Out<in X>) {}
-fun f6(p: Out) {}
+fun f4(p: Out<out X>) {}
+fun f5(p: Out<in X>) {}
+fun f6(p: Out) {}
-fun f6(p: Inv) {}
-fun f7(p: Inv) {}
-fun f8(p: Inv) {}
+fun f6(p: Inv) {}
+fun f7(p: Inv) {}
+fun f8(p: Inv) {}
-fun f9(p: In<*>) {}
-fun f10(p: Out<*>) {}
-fun f11(p: Inv<*>) {}
+fun f9(p: In<*>) {}
+fun f10(p: Out<*>) {}
+fun f11(p: Inv<*>) {}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/DataFlowInMultiDeclInFor.kt b/compiler/testData/diagnostics/tests/declarationChecks/DataFlowInMultiDeclInFor.kt
index 0911d17433c..4e185172718 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/DataFlowInMultiDeclInFor.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/DataFlowInMultiDeclInFor.kt
@@ -8,8 +8,8 @@ class A {
}
fun foo(list: List) {
- for (var (c1, c2, c3) in list) {
- c1 = 1
+ for (var (c1, c2, c3) in list) {
+ c1 = 1
c3 + 1
}
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/DataFlowInfoInMultiDecl.kt b/compiler/testData/diagnostics/tests/declarationChecks/DataFlowInfoInMultiDecl.kt
index 09a8ff45cd5..69ba3e89ef4 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/DataFlowInfoInMultiDecl.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/DataFlowInfoInMultiDecl.kt
@@ -5,10 +5,10 @@ class A {
fun a(aa : A?, b : Any) {
if (aa != null) {
- val (a1, b1) = aa;
+ val (a1, b1) = aa;
}
if (b is A) {
- val (a1, b1) = b;
+ val (a1, b1) = b;
}
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.kt b/compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.kt
index 2e3778aa182..b474cebe8e0 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/FunctionWithMissingNames.kt
@@ -18,9 +18,9 @@ class Outer {
}
fun outerFun() {
- fun () {}
- fun B.() {}
+ fun () {}
+ fun B.() {}
- @a fun () {}
- fun @a A.() {}
-}
\ No newline at end of file
+ @a fun () {}
+ fun @a A.() {}
+}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/LocalVariableWithNoTypeInformation.kt b/compiler/testData/diagnostics/tests/declarationChecks/LocalVariableWithNoTypeInformation.kt
index 50c309fa4d6..809877f2071 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/LocalVariableWithNoTypeInformation.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/LocalVariableWithNoTypeInformation.kt
@@ -1,3 +1,3 @@
fun test() {
- val a
+ val a
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.kt b/compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.kt
index c754b55d98d..03abb77df1b 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.kt
@@ -2,7 +2,7 @@
package a
class MyClass {
- fun component1(i: Int) {}
+ fun component1(i: Int) {}
}
class MyClass2 {}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/RedeclarationsInMultiDecl.kt b/compiler/testData/diagnostics/tests/declarationChecks/RedeclarationsInMultiDecl.kt
index a23f77ad672..d42ff82a8a5 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/RedeclarationsInMultiDecl.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/RedeclarationsInMultiDecl.kt
@@ -4,11 +4,11 @@ class A {
}
fun a() {
- val (a, a) = A()
- val (x, y) = A();
+ val (a, a) = A()
+ val (x, y) = A();
val b = 1
use(b)
- val (b, y) = A();
+ val (b, y) = A();
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/anonymousFunAsLastExpressionInBlock.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/anonymousFunAsLastExpressionInBlock.fir.kt
deleted file mode 100644
index 6a1d156f778..00000000000
--- a/compiler/testData/diagnostics/tests/declarationChecks/anonymousFunAsLastExpressionInBlock.fir.kt
+++ /dev/null
@@ -1,43 +0,0 @@
-// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER -UNUSED_VARIABLE
-// !CHECK_TYPE
-fun foo(block: () -> (() -> Int)) {}
-
-fun test() {
- foo { fun(): Int {return 1} }
- foo({ fun() = 1 })
-
- val x1 =
- if (1 == 1)
- fun(): Int {return 1}
- else
- fun() = 1
-
- val x2 =
- if (1 == 1) {
- fun(): Int {
- return 1
- }
- }
- else
- fun() = 1
-
- val x3 = when (1) {
- 0 -> fun(): Int {return 1}
- else -> fun() = 1
- }
-
- val x31 = when (1) {
- 0 -> {
- fun(): Int {return 1}
- }
- else -> fun() = 1
- }
-
- val x4 = {
- y: Int -> fun(): Int {return 1}
- }
-
- x4 checkType { _>>() }
-
- { y: Int -> fun(): Int {return 1} }
-}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/anonymousFunAsLastExpressionInBlock.kt b/compiler/testData/diagnostics/tests/declarationChecks/anonymousFunAsLastExpressionInBlock.kt
index 899fa130d4c..b8d2bea075f 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/anonymousFunAsLastExpressionInBlock.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/anonymousFunAsLastExpressionInBlock.kt
@@ -1,3 +1,4 @@
+// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_ANONYMOUS_PARAMETER -UNUSED_VARIABLE
// !CHECK_TYPE
fun foo(block: () -> (() -> Int)) {}
@@ -39,5 +40,5 @@ fun test() {
x4 checkType { _>>() }
- { y: Int -> fun(): Int {return 1} }
+ { y: Int -> fun(): Int {return 1} }
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/DoubleDeclForLoop.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/DoubleDeclForLoop.fir.kt
deleted file mode 100644
index 065d6ac7c48..00000000000
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/DoubleDeclForLoop.fir.kt
+++ /dev/null
@@ -1,14 +0,0 @@
-class A {
- operator fun component1() = 1
- operator fun component2() = 1
-}
-
-class C {
- operator fun iterator(): Iterator = null!!
-}
-
-fun test() {
- for ((x, y) in C()) {
-
- }
-}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/DoubleDeclForLoop.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/DoubleDeclForLoop.kt
index 96b28fde3b1..680b28abdce 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/DoubleDeclForLoop.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/DoubleDeclForLoop.kt
@@ -1,3 +1,4 @@
+// FIR_IDENTICAL
class A {
operator fun component1() = 1
operator fun component2() = 1
@@ -8,7 +9,7 @@ class C {
}
fun test() {
- for ((x, y) in C()) {
+ for ((x, y) in C()) {
}
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/FolLoopTypeComponentTypeMismatch.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/FolLoopTypeComponentTypeMismatch.kt
index cc370383f35..c42675247ef 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/FolLoopTypeComponentTypeMismatch.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/FolLoopTypeComponentTypeMismatch.kt
@@ -9,7 +9,7 @@ class C {
}
fun test() {
- for ((x: Double, y: Int) in C()) {
+ for ((x: Double, y: Int) in C()) {
}
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.fir.kt
deleted file mode 100644
index fddfd72aaca..00000000000
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.fir.kt
+++ /dev/null
@@ -1,15 +0,0 @@
-class A {
- operator fun component1() = 1
- operator fun component1() = 1
- operator fun component2() = 1
-}
-
-class C {
- operator fun iterator(): Iterator = null!!
-}
-
-fun test() {
- for ((x, y) in C()) {
-
- }
-}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.kt
index 5d418ef3edd..b4c5b3fe393 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.kt
@@ -1,3 +1,4 @@
+// FIR_IDENTICAL
class A {
operator fun component1() = 1
operator fun component1() = 1
@@ -9,7 +10,7 @@ class C {
}
fun test() {
- for ((x, y) in C()) {
+ for ((x, y) in C()) {
}
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionMissing.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionMissing.fir.kt
deleted file mode 100644
index 95924e4c839..00000000000
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionMissing.fir.kt
+++ /dev/null
@@ -1,13 +0,0 @@
-class A {
- operator fun component1() = 1
-}
-
-class C {
- operator fun iterator(): Iterator = null!!
-}
-
-fun test() {
- for ((x, y) in C()) {
-
- }
-}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionMissing.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionMissing.kt
index 083e33365a7..4c05300d011 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionMissing.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionMissing.kt
@@ -1,3 +1,4 @@
+// FIR_IDENTICAL
class A {
operator fun component1() = 1
}
@@ -7,7 +8,7 @@ class C {
}
fun test() {
- for ((x, y) in C()) {
+ for ((x, y) in C()) {
}
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopMissingLoopParameter.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopMissingLoopParameter.kt
index 9b5dba7c613..ddeec533c23 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopMissingLoopParameter.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopMissingLoopParameter.kt
@@ -1,13 +1,13 @@
// !WITH_NEW_INFERENCE
fun useDeclaredVariables() {
for ((a, b)) {
- a
- b
+ a
+ b
}
}
fun checkersShouldRun() {
- for ((@A a, _)) {
+ for ((@A a, _)) {
}
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopWithExtensions.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopWithExtensions.fir.kt
deleted file mode 100644
index 30fca7424e3..00000000000
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopWithExtensions.fir.kt
+++ /dev/null
@@ -1,14 +0,0 @@
-class A {
-}
-operator fun A.component1() = 1
-operator fun A.component2() = 1
-
-class C {
- operator fun iterator(): Iterator = null!!
-}
-
-fun test() {
- for ((x, y) in C()) {
-
- }
-}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopWithExtensions.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopWithExtensions.kt
index 3d40eb655de..1976afeddb2 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopWithExtensions.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopWithExtensions.kt
@@ -1,3 +1,4 @@
+// FIR_IDENTICAL
class A {
}
operator fun A.component1() = 1
@@ -8,7 +9,7 @@ class C {
}
fun test() {
- for ((x, y) in C()) {
+ for ((x, y) in C()) {
}
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForWithExplicitTypes.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForWithExplicitTypes.fir.kt
deleted file mode 100644
index 3e97d2fc5ff..00000000000
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForWithExplicitTypes.fir.kt
+++ /dev/null
@@ -1,14 +0,0 @@
-class A {
- operator fun component1() = 1
- operator fun component2() = 1.0
-}
-
-class C {
- operator fun iterator(): Iterator = null!!
-}
-
-fun test() {
- for ((x: Int, y: Double) in C()) {
-
- }
-}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForWithExplicitTypes.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForWithExplicitTypes.kt
index be8c7dfa707..6f6ebdd5b6f 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForWithExplicitTypes.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForWithExplicitTypes.kt
@@ -1,3 +1,4 @@
+// FIR_IDENTICAL
class A {
operator fun component1() = 1
operator fun component2() = 1.0
@@ -8,7 +9,7 @@ class C {
}
fun test() {
- for ((x: Int, y: Double) in C()) {
+ for ((x: Int, y: Double) in C()) {
}
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/RedeclarationInForLoop.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/RedeclarationInForLoop.kt
index 315d51f0812..2d273316d4a 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/RedeclarationInForLoop.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/RedeclarationInForLoop.kt
@@ -8,7 +8,7 @@ class C {
}
fun test() {
- for ((x, x) in C()) {
+ for ((x, x) in C()) {
}
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/SingleDeclForLoop.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/SingleDeclForLoop.fir.kt
deleted file mode 100644
index 660bec07ada..00000000000
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/SingleDeclForLoop.fir.kt
+++ /dev/null
@@ -1,13 +0,0 @@
-class A {
- operator fun component1() = 1
-}
-
-class C {
- operator fun iterator(): Iterator = null!!
-}
-
-fun test() {
- for ((x) in C()) {
-
- }
-}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/SingleDeclForLoop.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/SingleDeclForLoop.kt
index 36f1248cb9e..24269ebf2f8 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/SingleDeclForLoop.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/SingleDeclForLoop.kt
@@ -1,3 +1,4 @@
+// FIR_IDENTICAL
class A {
operator fun component1() = 1
}
@@ -7,7 +8,7 @@ class C {
}
fun test() {
- for ((x) in C()) {
+ for ((x) in C()) {
}
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/destructuringDeclarationAssignedUnresolved.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/destructuringDeclarationAssignedUnresolved.kt
index c19fbf84ee8..fdccefac0a1 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/destructuringDeclarationAssignedUnresolved.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/destructuringDeclarationAssignedUnresolved.kt
@@ -1,11 +1,11 @@
fun useDeclaredVariables() {
val (a, b) = unresolved
- a
- b
+ a
+ b
}
fun checkersShouldRun() {
- val (@A a, _) = unresolved
+ val (@A a, _) = unresolved
}
annotation class A
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/destructuringDeclarationMissingInitializer.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/destructuringDeclarationMissingInitializer.kt
index 6de91aca333..000d605d584 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/destructuringDeclarationMissingInitializer.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/destructuringDeclarationMissingInitializer.kt
@@ -1,11 +1,11 @@
fun useDeclaredVariables() {
val (a, b)
- a
- b
+ a
+ b
}
fun checkersShouldRun() {
- val (@A a, _)
+ val (@A a, _)
}
annotation class A
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/underscore.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/underscore.kt
index 8725abe00de..420d72a8858 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/underscore.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/underscore.kt
@@ -45,7 +45,7 @@ fun test() {
foo(_, y)
- val (unused, _) = A()
+ val (unused, _) = A()
}
-fun foo(x: Int, y: String) {}
+fun foo(x: Int, y: String) {}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/kt1141.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/kt1141.fir.kt
deleted file mode 100644
index af4f585547f..00000000000
--- a/compiler/testData/diagnostics/tests/declarationChecks/kt1141.fir.kt
+++ /dev/null
@@ -1,21 +0,0 @@
-//KT-1141 No check that object in 'object expression' implements all abstract members of supertype
-
-package kt1141
-
-public interface SomeTrait {
- fun foo()
-}
-
-fun foo() {
- val x = object : SomeTrait {
- }
- x.foo()
-}
-
-object Rr : SomeTrait {}
-
-class C : SomeTrait {}
-
-fun foo2() {
- val r = object : Runnable {} //no error
-}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/kt1141.kt b/compiler/testData/diagnostics/tests/declarationChecks/kt1141.kt
index 8ff4388f74e..675ec61f967 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/kt1141.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/kt1141.kt
@@ -1,3 +1,4 @@
+// FIR_IDENTICAL
//KT-1141 No check that object in 'object expression' implements all abstract members of supertype
package kt1141
@@ -17,5 +18,5 @@ fun foo() {
class C : SomeTrait {}
fun foo2() {
- val r = object : Runnable {} //no error
+ val r = object : Runnable {} //no error
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/kt2643MultiDeclInControlFlow.kt b/compiler/testData/diagnostics/tests/declarationChecks/kt2643MultiDeclInControlFlow.kt
index dbd6261ea55..db0a87549c2 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/kt2643MultiDeclInControlFlow.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/kt2643MultiDeclInControlFlow.kt
@@ -7,21 +7,21 @@ class C {
}
fun test1(c: C) {
- val (a, b) = c
+ val (a, b) = c
}
fun test2(c: C) {
- val (a, b) = c
+ val (a, b) = c
a + 3
}
fun test3(c: C) {
- var (a, b) = c
- a = 3
+ var (a, b) = c
+ a = 3
}
fun test4(c: C) {
- var (a, b) = c
+ var (a, b) = c
a = 3
a + 1
}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/localDeclarationModifiers.kt b/compiler/testData/diagnostics/tests/declarationChecks/localDeclarationModifiers.kt
index 7cd5681ab25..af45dc6b115 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/localDeclarationModifiers.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/localDeclarationModifiers.kt
@@ -5,8 +5,8 @@ class T {
}
fun foo() {
- public val i = 11
- abstract val j
+ public val i = 11
+ abstract val j
override fun T.baz() = 2
private fun bar() = 2
-}
\ No newline at end of file
+}
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/namedFunAsLastExpressionInBlock.kt b/compiler/testData/diagnostics/tests/declarationChecks/namedFunAsLastExpressionInBlock.kt
index baff5fa8bbd..8e5080bde90 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/namedFunAsLastExpressionInBlock.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/namedFunAsLastExpressionInBlock.kt
@@ -44,7 +44,7 @@ fun test() {
x4 checkType { _>() }
- { y: Int -> fun named14(): Int {return 1} }
+ { y: Int -> fun named14(): Int {return 1} }
val b = (fun named15(): Boolean { return true })()
baz(fun named16(){})
diff --git a/compiler/testData/diagnostics/tests/declarationChecks/propertyInPackageHasNoInheritVisibility.kt b/compiler/testData/diagnostics/tests/declarationChecks/propertyInPackageHasNoInheritVisibility.kt
index 9f37883789e..b086dbaaaa0 100644
--- a/compiler/testData/diagnostics/tests/declarationChecks/propertyInPackageHasNoInheritVisibility.kt
+++ b/compiler/testData/diagnostics/tests/declarationChecks/propertyInPackageHasNoInheritVisibility.kt
@@ -7,4 +7,4 @@ fun test() {
}
var g: Int = 1
- protected set(i: Int) {}
\ No newline at end of file
+ protected set(i: Int) {}
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/disallowImplInTypeParameter.kt b/compiler/testData/diagnostics/tests/delegatedProperty/disallowImplInTypeParameter.kt
index ec70b1aa791..9b320bd7f82 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/disallowImplInTypeParameter.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/disallowImplInTypeParameter.kt
@@ -3,5 +3,5 @@ import kotlin.reflect.KProperty0
val a: Int by A()
class A {
- fun getValue(t: Any?, p: KProperty0<*>): Int = 1
+ fun getValue(t: Any?, p: KProperty0<*>): Int = 1
}
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt
index a7b588e8532..7ece8e9274a 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/differentDelegatedExpressions.kt
@@ -16,7 +16,7 @@ class A(outer: Outer) {
var f: String by foo(getMyProperty()) - 1
}
-fun foo(a: Any?) = MyProperty()
+fun foo(a: Any?) = MyProperty()
fun getMyProperty() = MyProperty()
@@ -35,7 +35,7 @@ class MyProperty {
}
operator fun MyProperty.unaryPlus() = MyProperty()
-operator fun MyProperty.minus(i: Int) = MyProperty()
+operator fun MyProperty.minus(i: Int) = MyProperty()
object O {
fun getMyProperty() = MyProperty()
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.kt
index 5d01b27f7c9..6fc1c5db6be 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.kt
@@ -24,8 +24,8 @@ class MyProperty1 {
// -----------------
class B {
- var a5: String by MyProperty2()
- var b5: String by getMyProperty2()
+ var a5: String by MyProperty2()
+ var b5: String by getMyProperty2()
}
fun getMyProperty2() = MyProperty2()
diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/setValue.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/setValue.kt
index 414d14999a2..424554c9c73 100644
--- a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/setValue.kt
+++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/setValue.kt
@@ -11,7 +11,7 @@ operator fun String.provideDelegate(receiver: Any?, p: Any) = Delegate()
var test1: String by Delegate()
var test2: String by Delegate()
-var test3: String by "OK"
+var test3: String by "OK"
var test4: String by "OK".provideDelegate(null, "")
var test5: String by "OK".provideDelegate(null, "")
diff --git a/compiler/testData/diagnostics/tests/delegation/DelegationAndOverriding.kt b/compiler/testData/diagnostics/tests/delegation/DelegationAndOverriding.kt
index 1868a537585..fa2cb73381f 100644
--- a/compiler/testData/diagnostics/tests/delegation/DelegationAndOverriding.kt
+++ b/compiler/testData/diagnostics/tests/delegation/DelegationAndOverriding.kt
@@ -5,7 +5,7 @@ interface T {
val v : Int
}
-open class Br(t : T) : T {
+open class Br(t : T) : T {
}
@@ -35,4 +35,4 @@ open class GC1(g : G) : G