-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Support qualifieres in multibinds map keys and set elements. #409
Comments
Should it be applicable to both key and value? |
Good question, I don't actually know that the current behavior is for map multibinds with the same key type but different value types. |
update: same key but different value type is treated as distinct, I can see usecases for this so it's best to keep, which means that yes this should be applicable to both key and value |
I've researched a little and I see a few problems:
To avoid both problems we would need to include generic's qualifiers (recursively?) into TypeKey comparison and that leads us to maybe supporting type qualifiers for generics in general rather than exclusively for |
I started to take a stab at this and reached a similar conclusion. |
What do you think of separating type qualifiers from member qualifiers? It would make folowing 2 things work differently:
In theory that might let us untie type qualifiers from everything else and handle them on the level of AstType. And it would be more closely aligned with how typealiases handled now, basically following code would not work:
|
…rom other qualifiers Fixes evant#409
As part of #253 we expect to support placing a qualifier on a typealias as a replacement to using the typealias is a qualifier directly, ex:
typealias MyString = @Named("name") String
. Right now this causes and issue with multibinds as you can't use in the Map or Set type.runs into
Since we treat these Map and Set here specially we can support the nested qualifier in these cases
The text was updated successfully, but these errors were encountered: