Skip to content

Conversation

captainsafia
Copy link
Member

Closes #61019.

@captainsafia captainsafia requested a review from a team as a code owner March 22, 2025 00:55
@ghost ghost added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Mar 22, 2025
@captainsafia captainsafia added feature-openapi area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc labels Mar 22, 2025
{
actualReturnType = compilation.GetSpecialType(SpecialType.System_Void);
}
actualReturnType = namedType.ConstructedFrom;
Copy link
Member

Choose a reason for hiding this comment

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

Was trying to understand what exactly this did, and why we couldn't just get rid of this check since ReplaceGenericArguments below should handle Task<T>.
Looks like ConstructedFrom would return Task<int> if you had a type like Example : Task<int>. Is that the desired effect? We should probably add a test like that.

We also have tests for Task and Task<T>

_cache.Add(new MemberKey(typeof(global::ExampleClass), MemberType.Method, "AddAsync", typeof(global::System.Threading.Tasks.Task<>), [typeof(global::System.Int32), typeof(global::System.Int32)]), new XmlComment(@"This method is an example of a method that
returns an awaitable item.", null, null, null, null, false, null, null, null));
_cache.Add(new MemberKey(typeof(global::ExampleClass), MemberType.Method, "DoNothingAsync", typeof(global::System.Threading.Tasks.Task), []), new XmlComment(@"This method is an example of a method that

So not too sure what was broken.

@captainsafia
Copy link
Member Author

Closing in favor of #61145.

@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview4 milestone Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-minimal Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates feature-openapi

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[10-preview.2] CS0673 error from XmlCommentGenerator

3 participants