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.target = to
|
||||
symbolsByJK[to] = it
|
||||
|
||||
@@ -53,7 +53,7 @@ class ImplicitInitializerConversion(private val context: ConversionContext) : Re
|
||||
.toMap()
|
||||
|
||||
fun JKMethodSymbol.parentConstructor(): JKMethodSymbol? =
|
||||
(symbolToConstructor[this]!!.delegationCall as? JKDelegationConstructorCall)
|
||||
(symbolToConstructor[this]?.delegationCall as? JKDelegationConstructorCall)
|
||||
?.identifier
|
||||
|
||||
val constructors = containingClass.declarationList
|
||||
|
||||
Reference in New Issue
Block a user