From cf5480a398a533862091f52969e4ad09ee83f123 Mon Sep 17 00:00:00 2001 From: Mikhail Glukhikh Date: Thu, 10 Sep 2020 09:29:45 +0300 Subject: [PATCH] [FIR] Questionable test data fixes (around captured types) --- .../recursiveFlexibleAssertions.fir.kt | 2 +- .../firProblems/candidateSymbol.fir.txt | 10 ++-- .../diagnostics/notLinked/dfa/neg/28.fir.kt | 2 +- .../diagnostics/notLinked/dfa/pos/9.fir.kt | 60 +++++++++---------- 4 files changed, 37 insertions(+), 37 deletions(-) diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/recursiveFlexibleAssertions.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/recursiveFlexibleAssertions.fir.kt index 067356ffafb..74d1efb30f0 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/recursiveFlexibleAssertions.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/recursiveFlexibleAssertions.fir.kt @@ -75,5 +75,5 @@ fun test() { } // TODO: FIR // {AbstractAssert<*, out Any!>! & EnumerableAssert<*, {Comparable<*> & java.io.Serializable!}>!} with unfolded flexible nullability - & EnumerableAssert<*, out kotlin.Comparable & java.io.Serializable..kotlin.Comparable? & java.io.Serializable?>..AbstractAssert<*, out ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, kotlin/String..ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, kotlin/String?!>? & EnumerableAssert<*, out kotlin.Comparable & java.io.Serializable..kotlin.Comparable? & java.io.Serializable?>?, out ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, kotlin/String..ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, kotlin/String?!> & EnumerableAssert & EnumerableAssert<*, out kotlin.Comparable & java.io.Serializable..kotlin.Comparable? & java.io.Serializable?>..AbstractAssert<*, out ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, kotlin/String..ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, kotlin/String?!>? & EnumerableAssert<*, out kotlin.Comparable & java.io.Serializable..kotlin.Comparable? & java.io.Serializable?>?, out kotlin.Comparable & java.io.Serializable..kotlin.Comparable? & java.io.Serializable?>..AbstractAssert & EnumerableAssert<*, out kotlin.Comparable & java.io.Serializable..kotlin.Comparable? & java.io.Serializable?>..AbstractAssert<*, out ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, kotlin/String..ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, kotlin/String?!>? & EnumerableAssert<*, out kotlin.Comparable & java.io.Serializable..kotlin.Comparable? & java.io.Serializable?>?, out ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, kotlin/String..ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, kotlin/String?!>? & EnumerableAssert & EnumerableAssert<*, out kotlin.Comparable & java.io.Serializable..kotlin.Comparable? & java.io.Serializable?>..AbstractAssert<*, out ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, kotlin/String..ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, kotlin/String?!>? & EnumerableAssert<*, out kotlin.Comparable & java.io.Serializable..kotlin.Comparable? & java.io.Serializable?>?, out kotlin.Comparable & java.io.Serializable..kotlin.Comparable? & java.io.Serializable?>?")!>assertion + & EnumerableAssert<*, out kotlin.Comparable & java.io.Serializable..kotlin.Comparable? & java.io.Serializable?>..AbstractAssert<*, out ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, kotlin/String..ERROR CLASS: CST(ERROR CLASS: Unexpected classifier: null, kotlin/String?!>? & EnumerableAssert<*, out kotlin.Comparable & java.io.Serializable..kotlin.Comparable? & java.io.Serializable?>?")!>assertion } diff --git a/compiler/testData/ir/irText/firProblems/candidateSymbol.fir.txt b/compiler/testData/ir/irText/firProblems/candidateSymbol.fir.txt index 4d1fe4d9f52..5b064e770a5 100644 --- a/compiler/testData/ir/irText/firProblems/candidateSymbol.fir.txt +++ b/compiler/testData/ir/irText/firProblems/candidateSymbol.fir.txt @@ -127,8 +127,8 @@ FILE fqName: fileName:/candidateSymbol.kt FUN name:foo visibility:public modality:FINAL <> (candidate:.Candidate) returnType:kotlin.Unit VALUE_PARAMETER name:candidate index:0 type:.Candidate BLOCK_BODY - VAR name:me type:.FirSymbolOwner.AbstractFirBasedSymbol> [val] - CALL 'public final fun (): E of .AbstractFirBasedSymbol declared in .AbstractFirBasedSymbol' type=.FirSymbolOwner.AbstractFirBasedSymbol> origin=GET_PROPERTY + VAR name:me type:.FirSymbolOwner.FirSymbolOwner.FirSymbolOwner.FirSymbolOwner.FirSymbolOwner>>>> [val] + CALL 'public final fun (): E of .AbstractFirBasedSymbol declared in .AbstractFirBasedSymbol' type=.FirSymbolOwner.FirSymbolOwner.FirSymbolOwner.FirSymbolOwner.FirSymbolOwner>>>> origin=GET_PROPERTY $this: CALL 'public final fun (): .AbstractFirBasedSymbol<*> declared in .Candidate' type=.AbstractFirBasedSymbol<*> origin=GET_PROPERTY $this: GET_VAR 'candidate: .Candidate declared in .foo' type=.Candidate origin=null WHEN type=kotlin.Unit origin=IF @@ -136,12 +136,12 @@ FILE fqName: fileName:/candidateSymbol.kt if: WHEN type=kotlin.Boolean origin=ANDAND BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=.FirCallableMemberDeclaration<*> - GET_VAR 'val me: .FirSymbolOwner.AbstractFirBasedSymbol> [val] declared in .foo' type=.FirSymbolOwner.AbstractFirBasedSymbol> origin=null + GET_VAR 'val me: .FirSymbolOwner.FirSymbolOwner.FirSymbolOwner.FirSymbolOwner.FirSymbolOwner>>>> [val] declared in .foo' type=.FirSymbolOwner.FirSymbolOwner.FirSymbolOwner.FirSymbolOwner.FirSymbolOwner>>>> origin=null then: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ $this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ - arg0: CALL 'public abstract fun (): .AbstractFirBasedSymbol.FirCallableMemberDeclaration> declared in .FirCallableMemberDeclaration' type=.AbstractFirBasedSymbol<.FirCallableMemberDeclaration.FirCallableMemberDeclaration>> origin=GET_PROPERTY + arg0: CALL 'public abstract fun (): .AbstractFirBasedSymbol.FirCallableMemberDeclaration> declared in .FirCallableMemberDeclaration' type=.AbstractFirBasedSymbol.FirCallableMemberDeclaration<*>> origin=GET_PROPERTY $this: TYPE_OP type=.FirCallableMemberDeclaration<*> origin=IMPLICIT_CAST typeOperand=.FirCallableMemberDeclaration<*> - GET_VAR 'val me: .FirSymbolOwner.AbstractFirBasedSymbol> [val] declared in .foo' type=.FirSymbolOwner.AbstractFirBasedSymbol> origin=null + GET_VAR 'val me: .FirSymbolOwner.FirSymbolOwner.FirSymbolOwner.FirSymbolOwner.FirSymbolOwner>>>> [val] declared in .foo' type=.FirSymbolOwner.FirSymbolOwner.FirSymbolOwner.FirSymbolOwner.FirSymbolOwner>>>> origin=null arg1: CONST Null type=kotlin.Nothing? value=null BRANCH if: CONST Boolean type=kotlin.Boolean value=true diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/28.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/28.fir.kt index 56b31aefa59..bc4e2af6ba6 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/28.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/neg/28.fir.kt @@ -6,6 +6,6 @@ fun > Inv.case_1() { if (this is MutableList<*>) { & Inv & kotlin.collections.MutableList<*> & Inv")!>this - & Inv & kotlin.collections.MutableList<*> & Inv")!>this[0] = & Inv & kotlin.collections.MutableList<*> & Inv")!>this[1] + & Inv & kotlin.collections.MutableList<*> & Inv")!>this[0] = & Inv & kotlin.collections.MutableList<*> & Inv")!>this[1] } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/9.fir.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/9.fir.kt index bfe57ead2e7..7b5c51d6683 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/9.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/9.fir.kt @@ -27,26 +27,26 @@ fun case_2(a: Out?>?>?>?>?>?) if (a != null) { val b = ?>?>?>?>?> & Out?>?>?>?>?>?")!>a.get() if (b != null) { - val c = ?>?>?>?> & Out?>?>?>?>?")!>b.get() + val c = ?>?>?>?> & Out?>?>?>?>?")!>b.get() if (c != null) { - val d = ?>?>?> & Out?>?>?>?")!>c.get() + val d = ?>?>?> & Out?>?>?>?")!>c.get() if (d != null) { - val e = ?>?> & Out?>?>?")!>d.get() + val e = ?>?> & Out?>?>?")!>d.get() if (e != null) { - val f = ?> & Out?>?")!>e.get() + val f = ?> & Out?>?")!>e.get() if (f != null) { - val g = & Out?")!>f.get() + val g = & Out?")!>f.get() if (g != null) { - g - g.equals(null) - g.propT - g.propAny - g.propNullableT - g.propNullableAny - g.funT() - g.funAny() - g.funNullableT() - g.funNullableAny() + g + g.equals(null) + g.propT + g.propAny + g.propNullableT + g.propNullableAny + g.funT() + g.funAny() + g.funNullableT() + g.funNullableAny() } } } @@ -383,26 +383,26 @@ fun case_17(a: Inv?>?>?>?>?>?) { if (a != null) { val b = ?>?>?>?>?> & Inv?>?>?>?>?>?")!>a.get() if (b != null) { - val c = ?>?>?>?> & Out?>?>?>?>?")!>b.get() + val c = ?>?>?>?> & Out?>?>?>?>?")!>b.get() if (c != null) { - val d = ?>?>?> & Out?>?>?>?")!>c.get() + val d = ?>?>?> & Out?>?>?>?")!>c.get() if (d != null) { - val e = ?>?> & Out?>?>?")!>d.get() + val e = ?>?> & Out?>?>?")!>d.get() if (e != null) { - val f = ?> & Out?>?")!>e.get() + val f = ?> & Out?>?")!>e.get() if (f != null) { - val g = & Out?")!>f.get() + val g = & Out?")!>f.get() if (g != null) { - g - g.equals(null) - g.propT - g.propAny - g.propNullableT - g.propNullableAny - g.funT() - g.funAny() - g.funNullableT() - g.funNullableAny() + g + g.equals(null) + g.propT + g.propAny + g.propNullableT + g.propNullableAny + g.funT() + g.funAny() + g.funNullableT() + g.funNullableAny() } } }