Removed useless as casts from compiler code
It allows compiling code with K2 and enabled `-Werror`
This commit is contained in:
committed by
Space Team
parent
d50c6f1b6d
commit
1827df82c4
@@ -194,8 +194,7 @@ class PsiInlineCodegen(
|
||||
override fun reorderArgumentsIfNeeded(actualArgsWithDeclIndex: List<ArgumentAndDeclIndex>, valueParameterTypes: List<Type>) = Unit
|
||||
|
||||
override fun isInlinedToInlineFunInKotlinRuntime(): Boolean {
|
||||
val codegen = this.codegen as? ExpressionCodegen ?: return false
|
||||
val caller = codegen.context.functionDescriptor
|
||||
val caller = this.codegen.context.functionDescriptor
|
||||
if (!caller.isInline) return false
|
||||
val callerPackage = DescriptorUtils.getParentOfType(caller, PackageFragmentDescriptor::class.java) ?: return false
|
||||
return callerPackage.fqName.asString().startsWith("kotlin.")
|
||||
|
||||
+1
-2
@@ -65,8 +65,7 @@ abstract class PrimitiveNumberRangeIntrinsicRangeValue(
|
||||
|
||||
return when (comparisonGenerator.comparedType) {
|
||||
Type.DOUBLE_TYPE, Type.FLOAT_TYPE -> {
|
||||
val rangeLiteral = getBoundedValue(codegen) as? BoundedValue
|
||||
?: throw AssertionError("Floating point intrinsic range value should be a range literal")
|
||||
val rangeLiteral = getBoundedValue(codegen)
|
||||
InFloatingPointRangeLiteralExpressionGenerator(operatorReference, rangeLiteral, comparisonGenerator, codegen.frameMap)
|
||||
}
|
||||
else ->
|
||||
|
||||
Reference in New Issue
Block a user