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

Fix signature parsing edge cases #1214

Open
sbomer opened this issue May 26, 2020 · 3 comments
Open

Fix signature parsing edge cases #1214

sbomer opened this issue May 26, 2020 · 3 comments
Assignees

Comments

@sbomer
Copy link
Member

sbomer commented May 26, 2020

The signature parser (#1197) adapted from Roslyn's documentation comment id parser has some edge cases in which malformed inputs are still accepted. We mostly match the Roslyn behavior in these cases. Once dotnet/roslyn#44315 is fixed we should update our implementation to match.

@sbomer
Copy link
Member Author

sbomer commented Sep 22, 2020

For future reference: @eerhardt mentioned he didn't get warnings when using:

[DynamicDependency("DefaultIfEmpty`1(System.Collections.Generic.IEnumerable{``0})", typeof(Enumerable))]

for a method

public static IEnumerable<TSource?> DefaultIfEmpty<TSource>(this IEnumerable<TSource> source);

where the `1 should be ``1 to denote the number of method generic parameters rather than the number of type generic parameters. This looks like another case where the parser is overly accepting.

@eerhardt
Copy link
Member

where the `1 should be ``1

The `1 above isn't a reference to a generic type parameter. It is the number of generic arguments this method takes, right?

@sbomer
Copy link
Member Author

sbomer commented Sep 23, 2020

Yes - edited for clarity.

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

No branches or pull requests

3 participants