java2python icon indicating copy to clipboard operation
java2python copied to clipboard

translated constant arrays result in syntax errors

Open yucer opened this issue 8 years ago • 0 comments

A little problem translating array initializers. This Java code:

public class XParser extends BaseParser
{
    private static final char[] MYCHARARR = new char[] { 'a', 'b', 'c', 'd' };
    # ....
}

results in this invalid syntax:

class COSParser(BaseParser):
    MYCHARARR = [None] * 

it should be:

class COSParser(BaseParser):
    MYCHARARR = ['a', 'b', 'c', 'd']

yucer avatar Sep 27 '16 12:09 yucer