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 parsing of type arguments in arrays #9115

Merged
merged 7 commits into from
Sep 8, 2023

Conversation

jjonescz
Copy link
Member

@jjonescz jjonescz commented Aug 10, 2023

Fixes dotnet/aspnetcore#48526.

Previously DefaultTypeNameFeature.ParseTypeName("EventCallback<TItem[]>") would return ["TItem[]"], now it returns ["TItem"] (first, TItem[] is parsed out of EventCallback<TItem[]> as previously, and then TItem[] is recursively processsed to get the TItem).

@jjonescz jjonescz added the area-compiler Umbrella for all compiler issues label Aug 10, 2023
@jjonescz jjonescz marked this pull request as ready for review August 10, 2023 12:19
@jjonescz jjonescz requested a review from a team as a code owner August 10, 2023 12:19
@jjonescz jjonescz force-pushed the aspnetcore48526-GenericArray branch from 7735136 to bb23e26 Compare August 22, 2023 08:57
@jjonescz jjonescz requested a review from 333fred August 22, 2023 08:59
@jjonescz jjonescz requested a review from 333fred August 24, 2023 13:34
@jjonescz jjonescz requested a review from a team as a code owner August 25, 2023 07:52
Copy link
Member

@333fred 333fred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's definitely more room for improvement in intermediate array allocation, but we're probably at the point here were that doesn't really matter over readability. If it's a perf problem, we can look at it with that data.

@jjonescz jjonescz enabled auto-merge (squash) September 8, 2023 10:29
@jjonescz jjonescz merged commit 15c3cb6 into dotnet:main Sep 8, 2023
@jjonescz jjonescz deleted the aspnetcore48526-GenericArray branch September 8, 2023 11:04
@ghost ghost added this to the Next milestone Sep 8, 2023
@Cosifne Cosifne modified the milestones: Next, 17.8 P3 Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-compiler Umbrella for all compiler issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.NET 7 regression generic array parameters 35980
4 participants