[JS IR] add a flag which enable safe property access
If an accessor is not available at runtime we fall back to the property access. This is useful in cases when JS objects are casted to Kotlin classes implicitly. This pattern did work in the old BE, which lead to a significant amount of code which doesn't work anymore.
This commit is contained in:
committed by
TeamCityServer
parent
8b18818bcc
commit
6633a9edc0
@@ -273,9 +273,9 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
|
||||
multiModule = arguments.irPerModule,
|
||||
relativeRequirePath = true,
|
||||
propertyLazyInitialization = arguments.irPropertyLazyInitialization,
|
||||
legacyPropertyAccess = arguments.irLegacyPropertyAccess,
|
||||
)
|
||||
|
||||
|
||||
val jsCode = if (arguments.irDce && !arguments.irDceDriven) compiledModule.dceJsCode!! else compiledModule.jsCode!!
|
||||
outputFile.writeText(jsCode.mainModule)
|
||||
jsCode.dependencies.forEach { (name, content) ->
|
||||
|
||||
Reference in New Issue
Block a user