diff --git a/transpiler/src/main/eo/preface/xint.eo b/transpiler/src/main/eo/preface/xint.eo new file mode 100644 index 000000000..f8032f9c3 --- /dev/null +++ b/transpiler/src/main/eo/preface/xint.eo @@ -0,0 +1,11 @@ ++package preface ++alias fakeclasses preface.fakeclasses ++alias return preface.return + +[] > xint + fakeclasses.pyIntClass > @ + [x] > apply + [stackUp] > @ + seq > @ + stackUp.forward (return x) + 123 diff --git a/transpiler/src/main/scala/org/polystat/py2eo/transpiler/PrintLinearizedMutableEOWithCage.scala b/transpiler/src/main/scala/org/polystat/py2eo/transpiler/PrintLinearizedMutableEOWithCage.scala index 401bac0a5..2edcc40c5 100644 --- a/transpiler/src/main/scala/org/polystat/py2eo/transpiler/PrintLinearizedMutableEOWithCage.scala +++ b/transpiler/src/main/scala/org/polystat/py2eo/transpiler/PrintLinearizedMutableEOWithCage.scala @@ -39,6 +39,7 @@ object PrintLinearizedMutableEOWithCage { "+alias xmyArray preface.xmyArray", "+alias xlen preface.xlen", "+alias xlist preface.xlist", + "+alias xint preface.xint", "+alias xiter preface.xiter", "+alias xStopIteration preface.xStopIteration", "+alias xTypeError preface.xTypeError", @@ -331,7 +332,6 @@ object PrintLinearizedMutableEOWithCage { "pycomplex 0 0 > dummy-pycomplex", "pystring (sprintf \"\") > dummy-bool-string", "newUID > dummy-newUID", - "fakeclasses.pyIntClass > xint", "fakeclasses.pyFloatClass > xfloat", "fakeclasses.pyComplexClass > xcomplex", "raiseNothing > dummy-rn", @@ -343,6 +343,7 @@ object PrintLinearizedMutableEOWithCage { "mkCopy > dummy-mkCopy", "xlen > dummy-xlen", "xlist > dummy-xlist", + "xint > dummy-xint", "xStopIteration > dummy-stop-iteration", "xZeroDivisionError > dummy-xZeroDivisionError", "xTypeError > dummy-xTypeError", diff --git a/transpiler/src/test/resources/org/polystat/py2eo/transpiler/simple-tests/simple-statements/continue/for_try_else_continue2.yaml b/transpiler/src/test/resources/org/polystat/py2eo/transpiler/simple-tests/simple-statements/continue/for_try_else_continue2.yaml index 5d1710613..88f22c4c0 100644 --- a/transpiler/src/test/resources/org/polystat/py2eo/transpiler/simple-tests/simple-statements/continue/for_try_else_continue2.yaml +++ b/transpiler/src/test/resources/org/polystat/py2eo/transpiler/simple-tests/simple-statements/continue/for_try_else_continue2.yaml @@ -1,4 +1,4 @@ -enabled: False +enabled: True python: | def for_try_else_continue2(): items = [1, 2, 3, 4, 5, 6, 7, "hello", 100, 200, 300, 400]