Cleanup: fix some compiler warnings (mostly deprecations, javaClass)
This commit is contained in:
@@ -135,7 +135,7 @@ class WhileConditionFolding(val body: JsBlock) {
|
||||
// applying this rule repeatedly we get while (A && (B || C)), which is correct
|
||||
|
||||
is JsIf -> {
|
||||
val then = statement.thenStatement!!
|
||||
val then = statement.thenStatement
|
||||
if (statement.elseStatement == null) {
|
||||
val nextCondition = extractCondition(then, label)
|
||||
val result: JsExpression? = when (nextCondition) {
|
||||
|
||||
@@ -46,7 +46,7 @@ fun removeDefaultInitializers(arguments: List<JsExpression>, parameters: List<Js
|
||||
name != null && name in toRemove ->
|
||||
listOf<JsStatement>()
|
||||
name != null && name in toExpand ->
|
||||
flattenStatement((it as JsIf).thenStatement!!)
|
||||
flattenStatement((it as JsIf).thenStatement)
|
||||
else ->
|
||||
listOf(it)
|
||||
}
|
||||
@@ -91,7 +91,7 @@ private fun isNameInitialized(
|
||||
name: JsName,
|
||||
initializer: JsStatement
|
||||
): Boolean {
|
||||
val thenStmt = (initializer as JsIf).thenStatement!!
|
||||
val thenStmt = (initializer as JsIf).thenStatement
|
||||
val lastThenStmt = flattenStatement(thenStmt).last()
|
||||
|
||||
val expr = (lastThenStmt as? JsExpressionStatement)?.expression
|
||||
|
||||
Reference in New Issue
Block a user