-
-
Notifications
You must be signed in to change notification settings - Fork 218
Open
Labels
Description
Expression with in-place floordiv operator within __pragma__('opov')
causes error.
Error occurs with x //= y
within __pragma__('opov')
.
Browser error: Uncaught SyntaxError: missing ) after argument list.
Causes whole script to fail execution when code is present even if not called.
Compiler error occurs with ifloordiv (x //= y
), no error with floordiv (x = x//y
).
Appears to be a compilation error though compiles with no error notice.
No error with other in-place arithmetic ops (+=, /=, %= ...).
python code:
def idiv():
x = 5
y = 2
x //= y
print(x)
def idiv_opov():
x = 5
y = 2
# __pragma__('opov')
x //= y
# __pragma__('noopov')
print(x)
idiv()
compiled javascript code:
export var idiv = function () {
var x = 5;
var y = 2;
var x = Math.floor (x / y);
print (x);
};
export var idiv_opov = function () {
var x = 5;
var y = 2;
var x = __call__ (Never here, null, x, y);
print (x);
};
idiv ();
env: Python3.9 venv with pip install Transcrypt
testing: Firefox version 133 in Linux