Changes between Version 146 and Version 147 of j2p


Ignore:
Timestamp:
10/16/24 10:30:57 (6 months ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • j2p

    v146 v147  
    425425||I get POSTFIX_INCREMENT: not supported and the same for POSTFIX_DECREMENT.  Why is this not supported?||The general prefix- and postfix-increments are tricky, because they postpone the actual change of the variable. In python multiple statements would have to be used. However this can also occur in situations where python does not allow such multiple statements. We recommend to manually unroll and use extra statements +=1 and -=1 before or after the statement. The general case may require more advanced refactoring.||
    426426||Everything compiles fine but I get {{{ImportError: cannot import name ... from partially initialized module}}} when running in python ||Typically this happened if your java code has a cyclic reference: class A refers to B and class B refers to A. Python can not handle such cyclic references. We suggest using the {{{@Defer}}} annotation to help the translator, or to refactor the code.||
     427||My java for loop seems to be translated to a weird looking while loop||That's correct. The java for loop is quite special, and you can use continue and break statements inside it that require us to do some tricks||