RapydScript
RapydScript copied to clipboard
Unpack tuple to multiple targets not supported
def kproperty(exports):
exports.L2, exports.L1, exports.L0 = L2, L1, L0 # works
exports.L2, exports.L1, exports.L0 = L2, L1, L0 = (2, 1, 0) # failed
which generates
function kproperty(exports) {
var _$rapyd$_Unpack;
_$rapyd$_Unpack = [L2, L1, L0];
exports.L2 = _$rapyd$_Unpack[0];
exports.L1 = _$rapyd$_Unpack[1];
exports.L0 = _$rapyd$_Unpack[2];
_$rapyd$_Unpack = [L2, _$rapyd$_Unpack = [2, 1, 0];
L1 = _$rapyd$_Unpack[0];
L0 = _$rapyd$_Unpack[1]];
exports.L2 = _$rapyd$_Unpack[0];
exports.L1 = _$rapyd$_Unpack[1];
exports.L0 = _$rapyd$_Unpack[2];
}
good catch, will investigate this
This is fixed in my fork. https://github.com/kovidgoyal/rapydscript-ng
@atsepkov This is not a single commit as there were many related issues that needed to be fixed. Just look at all commits made today.