[e-lang] swtgrid quasiparser broken in current SVN

Mark Miller erights at gmail.com
Mon Apr 23 14:25:05 EDT 2007


On 4/21/07, Mark S. Miller <markm at cs.jhu.edu> wrote:
>              def result := myChar - '0'
> [...]
> in swtGridQParserMaker, in subtracting two characters, is invoking the wrong
> overloads of the following two in CharacterSugar.java:
>
>      static public char subtract(char self, int delta) {
>          return CharacterMakerSugar.asChar((long)self - delta);
>      }
>
>      static public int subtract(char self, char other) {
>          return self - other;
>      }
>
> In other words, the literal '0' is being passed as an int (48) to the first
> overloading above, which produced a character result instead of an int result.
>
> This is probably caused by the recent changes to the overloading of Java sugar
> methods, but I haven't traced it further. Can you take it from here? Thanks.


Perhaps the simplest way to fix this is to find all cases where we
overload sugar methods on argument type and fix them so they no longer
do? Does this sound reasonable?


-- 
Text by me above is hereby placed in the public domain

    Cheers,
    --MarkM


More information about the e-lang mailing list