New J2K: Fix explicit NPE cases in conversions
This commit is contained in:
@@ -83,7 +83,7 @@ class JKSymbolProvider {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun transferSymbol(to: JKDeclaration, from: JKDeclaration) = symbolsByJK[from]!!.let {
|
fun transferSymbol(to: JKDeclaration, from: JKDeclaration) = symbolsByJK[from]?.also {
|
||||||
it as JKUniverseSymbol<JKTreeElement>
|
it as JKUniverseSymbol<JKTreeElement>
|
||||||
it.target = to
|
it.target = to
|
||||||
symbolsByJK[to] = it
|
symbolsByJK[to] = it
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class ImplicitInitializerConversion(private val context: ConversionContext) : Re
|
|||||||
.toMap()
|
.toMap()
|
||||||
|
|
||||||
fun JKMethodSymbol.parentConstructor(): JKMethodSymbol? =
|
fun JKMethodSymbol.parentConstructor(): JKMethodSymbol? =
|
||||||
(symbolToConstructor[this]!!.delegationCall as? JKDelegationConstructorCall)
|
(symbolToConstructor[this]?.delegationCall as? JKDelegationConstructorCall)
|
||||||
?.identifier
|
?.identifier
|
||||||
|
|
||||||
val constructors = containingClass.declarationList
|
val constructors = containingClass.declarationList
|
||||||
|
|||||||
Reference in New Issue
Block a user