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

Type nested in generic type cannot be task-like #16528

Closed
wants to merge 1 commit into from

Conversation

jcouv
Copy link
Member

@jcouv jcouv commented Jan 15, 2017

Customer scenario
The user makes a task-like type, but the async method builder has a Task property that returns a different type.
Currently there is a generic error during emit (in retail mode) or an assertion (in debug mode). With this fix a proper error is reported.

Bugs this fixes:
Fixes #16493

Workarounds, if any
Avoid such bad code.

Risk
Performance impact
Low. Additional check on containing type in method that checks task-like types.

Is this a regression from a previous update?
No

Root cause analysis:
New feature.

How was the bug found?
Reported by customer.

@cston @dotnet/roslyn-compiler for review.

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.

'Failed to emit module' error when compiling usages of a nested tasklike type
2 participants