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

Poor error message for mismatching function pointers #51224

Closed
YairHalberstadt opened this issue Feb 14, 2021 · 0 comments · Fixed by #51223
Closed

Poor error message for mismatching function pointers #51224

YairHalberstadt opened this issue Feb 14, 2021 · 0 comments · Fixed by #51223
Labels
Area-Compilers Bug Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings.
Milestone

Comments

@YairHalberstadt
Copy link
Contributor

Version Used: master as of 2d3ffe0 (9th feb)

Steps to Reproduce:

unsafe
{
    delegate* <ref int> fp1 = default;
    delegate* <int> fp2 = fp1;
}

Expected Behavior:

error CS0266: Cannot implicitly convert type 'delegate*<ref int>' to 'delegate*<int>'. An explicit conversion exists (are you missing a cast?)

Actual Behavior:

error CS0266: Cannot implicitly convert type 'delegate*<int>' to 'delegate*<int>'. An explicit conversion exists (are you missing a cast?)

Note the signatures delegate*<int> in the actual error message which is very confusing.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 14, 2021
@jaredpar jaredpar added Bug Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings. and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Feb 16, 2021
@jaredpar jaredpar added this to the Backlog milestone Feb 16, 2021
333fred pushed a commit that referenced this issue Mar 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug Concept-Diagnostic Clarity The issues deals with the ease of understanding of errors and warnings.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants