-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
ArC - injection point validation #24353
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, though I have reservations about the error messages. Wildcards and type variables are legal type arguments. IMHO, the errors should read more like "Injection point may not contain a wildcard type argument" or so.
Note I'm specifically using the term "type argument" instead of "type parameter". I'd encourage to follow this convention. In a function declaration, we define parameters. In a function call, we pass arguments. The same applies to generics. In a generic class/method declaration, we define type parameters (e.g. in class List<T> { ... }
, T
is a type parameter). In a generic instantiation of a class/method, we pass type arguments (e.g. in List<String>
, String
is a type argument).
Actually, the error message for
Ok, I'll update the error message for |
Some tests assert an error message of "Type variable is not a legal injection point type", which is totally fine. Other tests assert an error message of "Type variable is not a legal type parameter", and that's what I'm objecting about. |
This comment has been minimized.
This comment has been minimized.
02a9557
to
cd4c003
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and consistent with what we do in Weld.
This comment has been minimized.
This comment has been minimized.
I need to fix the |
- type variable is not a legal injection point type - also validate type params of types related to programmatic lookup, i.e. Instance<> and List<> with All qualifier
cd4c003
to
58eada9
Compare
i.e. Instance<> and List<> with All qualifier