In java you can add a modifier final to a field into a method.
This must be translated to "const" in C#. I think it is a solution. For now on, it is not translated at all so it does not compile.
Difficult to reproduce.
I found where it came from.
the mapping of java.lang.Stringbuffer was wrong :
method getChars(int, int, char[], int) { pattern = @0.CopyTo(@1, @3, @4, @2}; };
Note the end of the pattern : '}' instead of a ')'
The class i translated contains a StringBuffer and this method and i think the problem came from there.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you provide a Sample and a way to reproduce ?
Are you sure ?
Only static final fields are turned into const.
Other case could be readonly.
Difficult to reproduce.
I found where it came from.
the mapping of java.lang.Stringbuffer was wrong :
method getChars(int, int, char[], int) { pattern = @0.CopyTo(@1, @3, @4, @2}; };
Note the end of the pattern : '}' instead of a ')'
The class i translated contains a StringBuffer and this method and i think the problem came from there.