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

Passing the method back into DefaultParameterValue crashes #70206

Closed
Rageking8 opened this issue Oct 2, 2023 · 0 comments · Fixed by #70242
Closed

Passing the method back into DefaultParameterValue crashes #70206

Rageking8 opened this issue Oct 2, 2023 · 0 comments · Fixed by #70242
Assignees
Labels
4 - In Review A fix for the issue is submitted for review. Area-Compilers Bug
Milestone

Comments

@Rageking8
Copy link

Version Used: main (12 Sep 2023)

Steps to Reproduce:

Use this code on a fresh C# console project in VS (or use the sharplab link below):

using System.Runtime.InteropServices;

static class Program
{
    public static void Evil([DefaultParameterValue(Evil)]) {}

    public static void Main() {}
}

sharplab (this just keeps compiling)

Expected Behavior: Not crash and report some diagnostics

Actual Behavior: Crashes/Hangs

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 2, 2023
@jaredpar jaredpar added Bug and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 2, 2023
@jaredpar jaredpar added this to the 17.9 milestone Oct 2, 2023
AlekseyTs added a commit to AlekseyTs/roslyn that referenced this issue Oct 4, 2023
…e attribute.

Fixes dotnet#70206.
Also:
- Add support for using `nameof` in early bound well-known attributes
- Address a number of issues with support for Asc, AscW, Chr, ChrW VB functions in early bound well-known attributes
@AlekseyTs AlekseyTs added the 4 - In Review A fix for the issue is submitted for review. label Oct 6, 2023
AlekseyTs added a commit that referenced this issue Oct 12, 2023
…e attribute. (#70242)

Fixes #70206.
Also:
- Add support for using `nameof` in early bound well-known attributes in VB
- Address a number of issues with support for Asc, AscW, Chr, ChrW VB functions in early bound well-known attributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - In Review A fix for the issue is submitted for review. Area-Compilers Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants