Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Minemobs opened this issue May 22, 2024 · 1 comment
Open

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

Minemobs opened this issue May 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Minemobs
Copy link

Minemobs commented May 22, 2024

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;
  }
}
@mike-lischke
Copy link
Owner

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 mike-lischke added the bug Something isn't working label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants