-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
<see> IntelliSense offers keyword types for generic parameters, producing warnings #1468
Comments
Keyword types are fine in documentation comments as long as they are actually correct references, and not being used as generic arguments. |
@sharwell: But why are there different rules for specifying constructed generic types as method parameter types vs. as standalone types? |
@SLaks It's required for documentation comments to be able to differentiate the following: void Method(Func<int> intFunction)
void Method(Func<bool> boolFunction) There is no need to be able to use |
By the way, this bug is certainly a bug. |
@sharwell I know. But why is |
@SLaks Can you provide a specific example of where you are seeing an inconsistency? I'm not sure I understand your question. |
I mean that |
There is no documentation for a |
No.
|
@SLaks This is where things get a bit interesting. When referencing an open generic type, the documentation compiler requires an identifier but does not actually check the content of the identifier. It's like writing
It's no different from |
This is bothering me. I have a requirement for:
.. for which I need to document:
I realize that an overload with IDictionary<string, object> can accommodate this, but an overload should not be required solely in order to accommodate summary documentation. It should be possible to include generic implementation references in summary documentation. |
@stimpy77 see dotnet/csharplang#401 for that feature request 👍 |
Source:
IntelliSense will show
bool
, which will produce the following two warnings when selected:On a related note, why does this syntax produce an error when referencing types, but work fine in types in method arguments?
The text was updated successfully, but these errors were encountered: