FIR: Remove FirQualifiedAcces.safe in non-generated code

^KT-38444 In Progress
This commit is contained in:
Denis Zharkov
2020-06-02 12:35:54 +03:00
parent 55a4c40970
commit 291afd8448
18 changed files with 11 additions and 70 deletions
@@ -1006,11 +1006,7 @@ class FirRenderer(builder: StringBuilder, private val mode: RenderMode = RenderM
}
}
if (hasSomeReceiver) {
if (qualifiedAccess.safe) {
print("?.")
} else {
print(".")
}
print(".")
}
}
@@ -30,7 +30,6 @@ internal class FirExpressionWithSmartcastImpl(
override val source: FirSourceElement? get() = originalExpression.source
override val annotations: List<FirAnnotationCall> get() = originalExpression.annotations
override val safe: Boolean get() = originalExpression.safe
override val typeArguments: List<FirTypeProjection> get() = originalExpression.typeArguments
override val explicitReceiver: FirExpression? get() = originalExpression.explicitReceiver
override val dispatchReceiver: FirExpression get() = originalExpression.dispatchReceiver
@@ -80,4 +79,4 @@ internal class FirExpressionWithSmartcastImpl(
}
override fun replaceTypeRef(newTypeRef: FirTypeRef) {}
}
}