[NI] Remove hack for special functions
Treating special functions for `if`, `when`, `try`, `?:` as not accepting `Nothing` result type is incorrect. Making so leads to cases with uninferred `Nothing` result type for inner calls and lost data flow info.
This commit is contained in:
@@ -54,7 +54,7 @@ class InferenceComponents(
|
||||
val trivialConstraintTypeInferenceOracle = TrivialConstraintTypeInferenceOracle.create(ctx)
|
||||
private val incorporator = ConstraintIncorporator(approximator, trivialConstraintTypeInferenceOracle)
|
||||
private val injector = ConstraintInjector(incorporator, approximator, KotlinTypeRefiner.Default)
|
||||
val resultTypeResolver = ResultTypeResolver(approximator, trivialConstraintTypeInferenceOracle, null)
|
||||
val resultTypeResolver = ResultTypeResolver(approximator, trivialConstraintTypeInferenceOracle)
|
||||
|
||||
fun createConstraintSystem(): NewConstraintSystemImpl {
|
||||
return NewConstraintSystemImpl(injector, ctx)
|
||||
|
||||
+2
-2
@@ -90,8 +90,8 @@ class IntegerLiteralTypeApproximationTransformer(
|
||||
val expectedType: ConeKotlinType? = when {
|
||||
!leftIsIlt && !rightIsIlt -> return operatorCall.compose()
|
||||
leftIsIlt && rightIsIlt -> null
|
||||
leftIsIlt -> rightArgument.typeRef.coneTypeUnsafe()
|
||||
rightIsIlt -> leftArgument.typeRef.coneTypeUnsafe()
|
||||
leftIsIlt -> rightArgument.typeRef.coneTypeUnsafe<ConeKotlinType>()
|
||||
rightIsIlt -> leftArgument.typeRef.coneTypeUnsafe<ConeKotlinType>()
|
||||
else -> throw IllegalStateException()
|
||||
}
|
||||
|
||||
|
||||
Generated
+5
@@ -17953,6 +17953,11 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/SpecififcityByReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("testNestedSpecialCalls.kt")
|
||||
public void testTestNestedSpecialCalls() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/testNestedSpecialCalls.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TypeMismatchOnUnaryOperations.kt")
|
||||
public void testTypeMismatchOnUnaryOperations() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.kt");
|
||||
|
||||
-8
@@ -97,12 +97,4 @@ class KotlinResolutionStatelessCallbacksImpl(
|
||||
else
|
||||
ConstraintSystemBuilderImpl.forSpecificity()
|
||||
}
|
||||
|
||||
override fun isSpecialFunctionTypeParameterName(name: Name): Boolean {
|
||||
return ControlStructureTypingUtils.ResolveConstruct.values().any { it.specialTypeParameterName == name }
|
||||
}
|
||||
|
||||
override fun isExclExclTypeParameterName(name: Name): Boolean {
|
||||
return name == ControlStructureTypingUtils.ResolveConstruct.EXCL_EXCL.specialTypeParameterName
|
||||
}
|
||||
}
|
||||
|
||||
-4
@@ -40,10 +40,6 @@ interface KotlinResolutionStatelessCallbacks {
|
||||
fun createConstraintSystemForOverloadResolution(
|
||||
constraintInjector: ConstraintInjector, builtIns: KotlinBuiltIns
|
||||
): SimpleConstraintSystem
|
||||
|
||||
fun isSpecialFunctionTypeParameterName(name: Name): Boolean
|
||||
|
||||
fun isExclExclTypeParameterName(name: Name): Boolean
|
||||
}
|
||||
|
||||
// This components hold state (trace). Work with this carefully.
|
||||
|
||||
+1
-10
@@ -30,8 +30,7 @@ import org.jetbrains.kotlin.types.model.TypeSystemInferenceExtensionContext
|
||||
|
||||
class ResultTypeResolver(
|
||||
val typeApproximator: AbstractTypeApproximator,
|
||||
val trivialConstraintTypeInferenceOracle: TrivialConstraintTypeInferenceOracle,
|
||||
private val statelessCallbacks: KotlinResolutionStatelessCallbacks? // TODO injection in FIR
|
||||
val trivialConstraintTypeInferenceOracle: TrivialConstraintTypeInferenceOracle
|
||||
) {
|
||||
interface Context : TypeSystemInferenceExtensionContext {
|
||||
fun isProperType(type: KotlinTypeMarker): Boolean
|
||||
@@ -85,20 +84,12 @@ class ResultTypeResolver(
|
||||
if (!checkConstraint(this, constraint.type, constraint.kind, resultType)) return false
|
||||
}
|
||||
if (!trivialConstraintTypeInferenceOracle.isSuitableResultedType(resultType)) {
|
||||
if (nothingIsForbiddenFor(variableWithConstraints.typeVariable)) return false
|
||||
if (resultType.isNullableType() && checkSingleLowerNullabilityConstraint(filteredConstraints)) return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
private fun nothingIsForbiddenFor(variable: TypeVariableMarker): Boolean {
|
||||
val parameterName = variable.safeAs<TypeVariableFromCallableDescriptor>()?.originalTypeParameter?.name ?: return false
|
||||
val isSpecialFunctionParameter = statelessCallbacks?.isSpecialFunctionTypeParameterName(parameterName) ?: false
|
||||
val isFromExclExcl = isSpecialFunctionParameter && statelessCallbacks?.isExclExclTypeParameterName(parameterName) ?: false
|
||||
return isSpecialFunctionParameter && !isFromExclExcl
|
||||
}
|
||||
|
||||
private fun checkSingleLowerNullabilityConstraint(constraints: List<Constraint>): Boolean {
|
||||
return constraints.singleOrNull { it.kind.isLower() }?.isNullabilityConstraint ?: false
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ val ww = if (true) {
|
||||
<!OI;TYPE_MISMATCH!>{ true }<!> <!USELESS_ELVIS!>?: null!!<!>
|
||||
}
|
||||
else if (true) {
|
||||
<!OI;TYPE_MISMATCH!>{ true }<!> <!USELESS_ELVIS!>?: null!!<!>
|
||||
<!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH, TYPE_MISMATCH!>{ <!NI;CONSTANT_EXPECTED_TYPE_MISMATCH!>true<!> }<!> <!USELESS_ELVIS!>?: null!!<!>
|
||||
}
|
||||
else {
|
||||
null!!
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
inline fun <reified T> parse(json: String): T? = TODO()
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !WITH_NEW_INFERENCE
|
||||
|
||||
inline fun <reified T> parse(json: String): T? = TODO()
|
||||
|
||||
@@ -6,7 +7,7 @@ class MyType
|
||||
|
||||
fun parseMyData(json: String): MyType =
|
||||
try {
|
||||
parse(json) // error with new inf only: Cannot use 'Nothing?' as reified type parameter
|
||||
<!NI;REIFIED_TYPE_FORBIDDEN_SUBSTITUTION, NI;REIFIED_TYPE_FORBIDDEN_SUBSTITUTION!>parse<!>(json) // error with new inf only: Cannot use 'Nothing?' as reified type parameter
|
||||
?: throw IllegalArgumentException("Can't parse")
|
||||
} catch (e: Exception) {
|
||||
throw IllegalArgumentException("Can't parse")
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNREACHABLE_CODE
|
||||
|
||||
fun test() {
|
||||
val x: Int? = 20
|
||||
if (x != null) {
|
||||
} else {
|
||||
if (true) return else return
|
||||
}
|
||||
x.and(1) // unsafe call
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNREACHABLE_CODE
|
||||
|
||||
fun test() {
|
||||
val x: Int? = 20
|
||||
if (x != null) {
|
||||
} else {
|
||||
if (true) return else return
|
||||
}
|
||||
<!DEBUG_INFO_SMARTCAST!>x<!>.and(1) // unsafe call
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
public fun test(): kotlin.Unit
|
||||
@@ -58,9 +58,9 @@ fun case_4() {
|
||||
*/
|
||||
fun case_5() {
|
||||
var x: Int? = null
|
||||
if (<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!> == try { x = 10; null } finally {} && x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?"), DEBUG_INFO_SMARTCAST!>x<!>.inv()
|
||||
if (<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int?")!>x<!> == try { x = 10; null } finally {} && <!SENSELESS_COMPARISON!><!DEBUG_INFO_CONSTANT!>x<!> != null<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int? & kotlin.Nothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing"), DEBUG_INFO_SMARTCAST!>x<!>.<!UNREACHABLE_CODE!>inv()<!>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,10 +58,10 @@ fun case_3() {
|
||||
*/
|
||||
fun case_4() {
|
||||
var x: Int? = null
|
||||
if (x == try { x = 10; null } finally {} && x != null) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int?"), DEBUG_INFO_SMARTCAST!>x<!>.inv()
|
||||
println(1)
|
||||
if (x == try { x = 10; null } finally {} && <!SENSELESS_COMPARISON!><!DEBUG_INFO_CONSTANT!>x<!> != null<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int & kotlin.Int? & kotlin.Nothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Int? & kotlin.Nothing"), DEBUG_INFO_SMARTCAST!>x<!>.<!UNREACHABLE_CODE!>inv()<!>
|
||||
<!UNREACHABLE_CODE!>println(1)<!>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ fun case_10(x: Any?, z: Any, b: Boolean?) {
|
||||
null -> throw Exception()
|
||||
}
|
||||
z === y || if (b == true) return else if (<!IMPLICIT_BOXING_IN_IDENTITY_EQUALS!>b === false<!>) null!! else throw Exception()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Any")!>y<!>.equals(10)
|
||||
}
|
||||
|
||||
+31
-31
@@ -337,17 +337,17 @@ fun case_18(a: DeepObject.A.B.C.D.E.F.G.J?, b: Boolean) {
|
||||
val x = null
|
||||
val y = null
|
||||
|
||||
if (a != (if (b) <!DEBUG_INFO_CONSTANT!>x<!> else <!DEBUG_INFO_CONSTANT!>y<!>) || <!DEBUG_INFO_CONSTANT!>x<!> !== a) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!><!UNSAFE_CALL!>.<!>equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!><!UNSAFE_CALL!>.<!>propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!><!UNSAFE_CALL!>.<!>funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funNullableAny()
|
||||
if (a != (if (b) <!DEBUG_INFO_CONSTANT!>x<!> else <!DEBUG_INFO_CONSTANT!>y<!>) || <!DEBUG_INFO_CONSTANT!>x<!> !== <!DEBUG_INFO_CONSTANT!>a<!>) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?"), DEBUG_INFO_SMARTCAST!>a<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?"), DEBUG_INFO_SMARTCAST!>a<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?"), DEBUG_INFO_SMARTCAST!>a<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?"), DEBUG_INFO_SMARTCAST!>a<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?"), DEBUG_INFO_SMARTCAST!>a<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("DeepObject.A.B.C.D.E.F.G.J & DeepObject.A.B.C.D.E.F.G.J?")!>a<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1187,16 +1187,16 @@ fun case_66(x: Any?, z1: Nothing?, z2: Nothing?, b: Boolean) {
|
||||
if (x is ClassLevel3?) {
|
||||
if (x != if (b) { <!DEBUG_INFO_CONSTANT!>z1<!> } else { <!DEBUG_INFO_CONSTANT!>z2<!> } && x is ClassLevel4?) {
|
||||
if (x is ClassLevel5?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1? & ClassLevel2? & ClassLevel3? & ClassLevel4? & ClassLevel5? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1? & ClassLevel2? & ClassLevel3? & ClassLevel4? & ClassLevel5? & kotlin.Any?")!>x<!><!UNSAFE_CALL!>.<!>equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5? & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1? & ClassLevel2? & ClassLevel3? & ClassLevel4? & ClassLevel5? & kotlin.Any?")!>x<!><!UNSAFE_CALL!>.<!>propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5? & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1? & ClassLevel2? & ClassLevel3? & ClassLevel4? & ClassLevel5? & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5? & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1? & ClassLevel2? & ClassLevel3? & ClassLevel4? & ClassLevel5? & kotlin.Any?")!>x<!><!UNSAFE_CALL!>.<!>funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5? & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1? & ClassLevel2? & ClassLevel3? & ClassLevel4? & ClassLevel5? & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & ClassLevel2 & ClassLevel3 & ClassLevel4 & ClassLevel5 & kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & ClassLevel2 & ClassLevel3 & ClassLevel4 & ClassLevel5 & kotlin.Any & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & ClassLevel2 & ClassLevel3 & ClassLevel4 & ClassLevel5 & kotlin.Any & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1249,16 +1249,16 @@ fun case_68(x: Any?, z: Nothing?) {
|
||||
*/
|
||||
fun case_69(x: Any?, z: Nothing?) {
|
||||
if (x is ClassLevel1? && x is ClassLevel2? && x is ClassLevel3? && x is ClassLevel4? && x != try { <!DEBUG_INFO_CONSTANT!>z<!> } catch (e: Exception) { <!DEBUG_INFO_CONSTANT!>z<!> } && x is ClassLevel5?) {
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1? & ClassLevel2? & ClassLevel3? & ClassLevel4? & ClassLevel5? & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1? & ClassLevel2? & ClassLevel3? & ClassLevel4? & ClassLevel5? & kotlin.Any?")!>x<!><!UNSAFE_CALL!>.<!>equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5? & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1? & ClassLevel2? & ClassLevel3? & ClassLevel4? & ClassLevel5? & kotlin.Any?")!>x<!><!UNSAFE_CALL!>.<!>propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5? & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1? & ClassLevel2? & ClassLevel3? & ClassLevel4? & ClassLevel5? & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5? & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1? & ClassLevel2? & ClassLevel3? & ClassLevel4? & ClassLevel5? & kotlin.Any?")!>x<!><!UNSAFE_CALL!>.<!>funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5? & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1? & ClassLevel2? & ClassLevel3? & ClassLevel4? & ClassLevel5? & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & ClassLevel2 & ClassLevel3 & ClassLevel4 & ClassLevel5 & kotlin.Any & kotlin.Any?")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.equals(null)
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.propT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.propAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.propNullableT
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & ClassLevel2 & ClassLevel3 & ClassLevel4 & ClassLevel5 & kotlin.Any & kotlin.Any?")!>x<!>.propNullableAny
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.funT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.funAny()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel5 & kotlin.Any?"), DEBUG_INFO_SMARTCAST!>x<!>.funNullableT()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("ClassLevel1 & ClassLevel2 & ClassLevel3 & ClassLevel4 & ClassLevel5 & kotlin.Any & kotlin.Any?")!>x<!>.funNullableAny()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17965,6 +17965,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/SpecififcityByReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("testNestedSpecialCalls.kt")
|
||||
public void testTestNestedSpecialCalls() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/testNestedSpecialCalls.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TypeMismatchOnUnaryOperations.kt")
|
||||
public void testTypeMismatchOnUnaryOperations() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.kt");
|
||||
|
||||
Generated
+5
@@ -17955,6 +17955,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/SpecififcityByReceiver.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("testNestedSpecialCalls.kt")
|
||||
public void testTestNestedSpecialCalls() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/testNestedSpecialCalls.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("TypeMismatchOnUnaryOperations.kt")
|
||||
public void testTypeMismatchOnUnaryOperations() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/regressions/TypeMismatchOnUnaryOperations.kt");
|
||||
|
||||
Reference in New Issue
Block a user