-
Notifications
You must be signed in to change notification settings - Fork 170
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
Type ambiguity in iterable.Joined
ctors
#1600
Comments
@victornoel Proposal is to extract from this class
|
@andreoss I experimented a bit and changing |
@victornoel I don't think so. After erasurej |
@andreoss maybe I misunderstood the subject you are talking about. This is what I understand:
So now, even after applying the fix I propose (test it, your code will compile, at least in Eclipse), we only have one problem left that I can see: the ambiguity. If I call But in practice, I don't see it happening, because you are always assigning a new Joined to something, so the compiler will know. Am I missing something here? Do you have examples of problematic code (once you applied the fix I propose). |
@andreoss any feedback on the above? |
iterable.Joined
iterable.Joined
ctors
@victornoel Yes, the problem is compile time only. I wanted to suggest to remove vararg ctor, or move it to another class. But if wildcard solves that, it's fine. WIll make a PR. |
@andreoss by the way, what about this? Was there a PR in the end? |
Joined
has two constructors with the same erasure.Example:
The text was updated successfully, but these errors were encountered: