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

Use specific error message for wrong arity in async builder #54632

Merged
merged 1 commit into from
Jul 7, 2021

Conversation

jcouv
Copy link
Member

@jcouv jcouv commented Jul 6, 2021

Test plan: #51999

Corresponding spec change: dotnet/csharplang#4903
FYI @stephentoub

@jcouv jcouv self-assigned this Jul 6, 2021
@jcouv jcouv added this to the C# 10 milestone Jul 6, 2021
@jcouv jcouv marked this pull request as ready for review July 6, 2021 17:31
@jcouv jcouv requested a review from a team as a code owner July 6, 2021 17:31
@stephentoub
Copy link
Member

Thanks for taking my feedback 😄

@jcouv jcouv requested review from RikkiGibson and a team July 6, 2021 23:07
@RikkiGibson RikkiGibson self-assigned this Jul 7, 2021
? builderType.IsUnboundGenericType && builderType.ContainingType?.IsGenericType != true && builderType.Arity == 1
: !builderType.IsGenericType;
if (isArityOk)
if (isGeneric)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please clarify the difference between isGeneric and builderType.IsGenericType?

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it something like: isGeneric refers to whether the task-like thing is generic, while builderType.IsGenericType refers to whether the builder is generic?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct. Whether the return type is generic or not drives the rest of the process.

@jcouv jcouv merged commit c6b56f2 into dotnet:main Jul 7, 2021
@jcouv jcouv deleted the bound-generic branch July 7, 2021 20:37
@ghost ghost modified the milestones: C# 10, Next Jul 7, 2021
333fred added a commit to 333fred/roslyn that referenced this pull request Jul 8, 2021
* upstream/main: (559 commits)
  Remove a few unused error codes (dotnet#54663)
  Use specific error message for wrong arity in async builder (dotnet#54632)
  Update azure-pipelines-richnav.yml (dotnet#54662)
  Capture file content on open instead of save (dotnet#54643)
  Add docs
  Further FAR simplifications
  Handle enhanced #line directive in DirectiveTriviaSyntax.DirectiveNameToken (dotnet#54636)
  move server name outside of loop
  Fix functionid
  Reduce telemetry output from find document in workspace
  Ensure we don't try and build an empty table when modifying entries with no values (dotnet#54639)
  Feedback
  Ensure we don't try and build an empty table when modifying entries with no values (dotnet#54639)
  No need to specialized logic for determining set of projects to search
  Defer group computation till reporting time
  Handle FAR for global suppressions in a consistent fashion
  Update status for enhanced `#line` directive (dotnet#54581)
  Split IOperationTests into one part per type
  [LSP] Revert semantic tokens change in main (dotnet#54570)
  Add exceptionutilities unreachable to catch blocks that should not be hit
  ...
@allisonchou allisonchou modified the milestones: Next, 17.0.P3 Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants