Menu

#73 Translation of final fields in method

open-remind
None
5
2010-01-26
2010-01-08
No

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.

Discussion

  • Alexandre FAU

    Alexandre FAU - 2010-01-11
    • assigned_to: nobody --> alexandrefau
     
  • Alexandre FAU

    Alexandre FAU - 2010-01-22

    Can you provide a Sample and a way to reproduce ?

     
  • Alexandre FAU

    Alexandre FAU - 2010-01-26
    • status: open --> open-remind
     
  • Alexandre FAU

    Alexandre FAU - 2010-01-26

    Are you sure ?
    Only static final fields are turned into const.
    Other case could be readonly.

     
  • Thomas Colin de Verdičre

    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.

     

Log in to post a comment.