[NI] Assume that ILT is number type in inference
#KT-41679 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
a107e3d160
commit
99e681ec1d
+6
@@ -18957,6 +18957,12 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirDiagnosti
|
||||
runTest("compiler/testData/diagnostics/tests/numbers/intValuesOutOfRange.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt41679.kt")
|
||||
public void testKt41679() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/numbers/kt41679.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("literalReceiverWithIntegerValueType.kt")
|
||||
public void testLiteralReceiverWithIntegerValueType() throws Exception {
|
||||
|
||||
@@ -386,6 +386,7 @@ interface ConeInferenceContext : TypeSystemInferenceExtensionContext, ConeTypeCo
|
||||
|
||||
override fun KotlinTypeMarker.isSignedOrUnsignedNumberType(): Boolean {
|
||||
require(this is ConeKotlinType)
|
||||
if (this is ConeIntegerLiteralType) return true
|
||||
if (this !is ConeClassLikeType) return false
|
||||
return isPrimitiveNumberOrUnsignedNumberType()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user