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

Regression: STC is losing generics information in inheritance #1419

Closed
chrylis opened this issue Nov 19, 2022 · 2 comments
Closed

Regression: STC is losing generics information in inheritance #1419

chrylis opened this issue Nov 19, 2022 · 2 comments
Assignees
Labels
Milestone

Comments

@chrylis
Copy link

chrylis commented Nov 19, 2022

I first ran into this with a trait that had a property of type List<String>, where GRECLIPSE was treating the property as type List<E> and producing errors, but I had trouble replicating it. However, this replicates what appears to be the same problem:

@Grab('com.google.guava:guava:29.0-jre')
import com.google.common.reflect.TypeToken

class Generics {
  private static final TypeToken<List<String>> LIST_STRING =
    new TypeToken<List<String>>() {}
    // ^ Type mismatch: cannot convert from new TypeToken<Object>(){} to TypeToken
}

This error is present in 4.8.0.v202211162249-e2206 (e4.24), and I think it was present in the nightly from Tuesday. It might be in Groovy itself, but groovyc 4.0.6 has no trouble with it.

@eric-milles eric-milles self-assigned this Nov 20, 2022
@eric-milles eric-milles added this to the v4.8.0 milestone Nov 20, 2022
@eric-milles
Copy link
Member

Related to #1358

@chrylis
Copy link
Author

chrylis commented Nov 21, 2022

Thanks, this appears to solve the problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants