java2typescript icon indicating copy to clipboard operation
java2typescript copied to clipboard

Java2Typescript replaces every <E> with <Math.E>

Open Minemobs opened this issue 1 year ago • 1 comments

Hello, I tried to convert a Java class that used generics, and when I ran java2typescript it replaced every <E> with <java.lang.Math.E>

I've made a simple example:

public class Example {
  public static <E> E getSame(E obj) {
    return obj;
  }
}

And here is the generated code:

export  class Example extends JavaObject {
  public static  getSame <E>(obj: java.lang.Math.E| null):  java.lang.Math.E | null {
    return obj;
  }
}

Minemobs avatar May 22 '24 14:05 Minemobs

I also saw recently that I introduced a serious regression in one of the last patches. Many symbols are resolved in a wrong way. Need to investigate.

mike-lischke avatar May 22 '24 14:05 mike-lischke