Details
-
Technical task
-
Resolution: Fixed
-
P1: Critical
-
779f6cf08 (dev), 6ebcf7afa (6.6)
Description
Currently, JS functions that have multiple levels of scopes – and variables that are accessed across scopes – will likely be uncompilable.
Code
import QtQuick Window { width: 640 height: 480 visible: true function foo(): void { let v1 = 1 let v2 = 2 if (true) { v1 = v2 } } }
Compiler output
Warning: Main.qml:13:4: Could not compile function foo: Instruction "generate_DeadTemporalZoneCheck" not implemented [compiler] v1 = v2 ^^
Partial workaround
For simple cases like the example above, removing the curly brackets around v1=v2 would do the trick