Skip to content
Prev Previous commit
Next Next commit
Always use safe call (?.) in Kotlin codegen
  • Loading branch information
volivan239 committed Sep 27, 2022
commit 4a46a78be7092bf35bb6c89362f7d9ac28c23158
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,7 @@ internal class CgKotlinRenderer(context: CgRendererContext, printer: CgPrinter =
}

override fun renderAccess(caller: CgExpression) {
if (caller.type.isNullable) print("?")
print(".")
print("?.")
}

override fun visit(element: CgParameterDeclaration) {
Expand Down