From 96c3436e73e66add64b183aebd25105381028f2c Mon Sep 17 00:00:00 2001 From: Denis Zharkov Date: Tue, 3 Nov 2020 16:04:51 +0300 Subject: [PATCH] FIR: Temporary adjust diagnostics test data UPPER_BOUND_VIOLATED for type alias constructors is not supported properly See KT-43142 --- .../testData/resolve/diagnostics/upperBoundViolated.kt | 4 ++-- .../testData/resolve/diagnostics/upperBoundViolated.txt | 4 ++-- .../typealias/boundViolationInTypeAliasConstructor.fir.kt | 8 ++++---- .../boundsViolationInDeepTypeAliasExpansion.fir.kt | 2 +- .../typealias/boundsViolationInTypeAliasExpansion.fir.kt | 6 +++--- .../typeAliasConstructorTypeArgumentsInference.fir.kt | 4 ++-- ...onstructorTypeArgumentsInferenceWithNestedCalls.fir.kt | 2 +- .../wrongNumberOfArgumentsInTypeAliasConstructor.fir.kt | 6 +++--- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.kt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.kt index 3a1cca555b7..b4fd2d58a74 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.kt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.kt @@ -41,8 +41,8 @@ fun rest() { class NumColl> typealias NL = NumColl> val test7 = NL() -val test8 = NL() +val test8 = NL() class NumberPhile(x: T) val np1 = NumberPhile(10) -val np2 = NumberPhile("Test") \ No newline at end of file +val np2 = NumberPhile("Test") diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.txt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.txt index e8bd8397e8e..f0c353ed66f 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.txt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/upperBoundViolated.txt @@ -58,9 +58,9 @@ FILE: upperBoundViolated.kt } public final typealias NL = R|NumColl>| - public final val test7: R|NumColl>| = R|SubstitutionOverride|() + public final val test7: R|NumColl>| = R|/NumColl.NumColl|() public get(): R|NumColl>| - public final val test8: R|NumColl>| = R|SubstitutionOverride|() + public final val test8: R|NumColl>| = R|/NumColl.NumColl|() public get(): R|NumColl>| public final class NumberPhile : R|kotlin/Any| { public constructor(x: R|T|): R|NumberPhile| { diff --git a/compiler/testData/diagnostics/tests/typealias/boundViolationInTypeAliasConstructor.fir.kt b/compiler/testData/diagnostics/tests/typealias/boundViolationInTypeAliasConstructor.fir.kt index eb31c42f913..92c6786e45c 100644 --- a/compiler/testData/diagnostics/tests/typealias/boundViolationInTypeAliasConstructor.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/boundViolationInTypeAliasConstructor.fir.kt @@ -5,8 +5,8 @@ typealias N = Num typealias N2 = N val x1 = Num("") -val x2 = N("") -val x3 = N2("") +val x2 = N("") +val x3 = N2("") class TColl> @@ -14,5 +14,5 @@ typealias TC = TColl typealias TC2 = TC val y1 = TCollAny>() -val y2 = TC() -val y3 = TC2() +val y2 = TC() +val y3 = TC2() diff --git a/compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.fir.kt b/compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.fir.kt index 51986247c74..c868b92be74 100644 --- a/compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.fir.kt @@ -14,4 +14,4 @@ fun test4(x: TC2>) {} val test5 = TC2>() val test6 = TC2>() val test7 = TC2>() -val test8 = TC2>() +val test8 = TC2>() diff --git a/compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasExpansion.fir.kt b/compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasExpansion.fir.kt index d8133bb37be..5b2b448a9dd 100644 --- a/compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasExpansion.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/boundsViolationInTypeAliasExpansion.fir.kt @@ -16,10 +16,10 @@ fun test3(x: NL) {} fun test4(x: NL) {} val test5 = NA() -val test6 = NA() +val test6 = NA() val test7 = NL() val test8 = MMMM() -val test9dwd = NL() +val test9dwd = NL() fun test9(x: TC>) {} fun test10(x: TC>) {} @@ -29,4 +29,4 @@ fun test12(x: TC>) {} val test13 = TC>() val test14 = TC>() val test15 = TC>() -val test16 = TC>() +val test16 = TC>() diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInference.fir.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInference.fir.kt index b8ee1fd1f65..b7008cf51e6 100644 --- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInference.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInference.fir.kt @@ -5,7 +5,7 @@ class Num(val x: Tn) typealias N = Num val test0 = N(1) -val test1 = N("1") +val test1 = N("1") class Cons(val head: T, val tail: Cons?) @@ -30,4 +30,4 @@ typealias F = Foo fun testProjections1(x: Pair) = F(x) fun testProjections2(x: Pair) = F(x) fun testProjections3(x: Pair) = F(x) -fun testProjections4(x: Pair) = F(x) \ No newline at end of file +fun testProjections4(x: Pair) = F(x) diff --git a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.fir.kt b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.fir.kt index ed47e4b8a16..7f8a87e86f3 100644 --- a/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/typeAliasConstructorTypeArgumentsInferenceWithNestedCalls.fir.kt @@ -5,4 +5,4 @@ class Cons(val head: T, val tail: Cons?) typealias C = Cons val test1 = C(1, C(2, null)) -val test2 = C(1, C("", null)) +val test2 = C(1, C("", null)) diff --git a/compiler/testData/diagnostics/tests/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.fir.kt b/compiler/testData/diagnostics/tests/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.fir.kt index fa611a11a7c..d321469fd3b 100644 --- a/compiler/testData/diagnostics/tests/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.fir.kt +++ b/compiler/testData/diagnostics/tests/typealias/wrongNumberOfArgumentsInTypeAliasConstructor.fir.kt @@ -29,9 +29,9 @@ val test3pr = P2(1, "") class Num(val x: T) typealias N = Num -val testN0 = N("") +val testN0 = N("") val testN1 = N(1) -val testN1a = N("") +val testN1a = N("") val testN2 = N(1) class MyPair(val string: T1, val number: T2) @@ -39,4 +39,4 @@ typealias MP = MyPair val testMP0 = MP("", 1) val testMP1 = MP(1, "") -val testMP2 = MP("", "") \ No newline at end of file +val testMP2 = MP("", "")