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

Diagnostic CodeFix for CS1737/BC30202: Optional parameters must appear after all required parameters #25368

Open
MaStr11 opened this issue Mar 9, 2018 · 0 comments

Comments

@MaStr11
Copy link
Contributor

MaStr11 commented Mar 9, 2018

Steps to Reproduce:

public class C {
    public void M(int i1 = 1, int i2)  // CS1737: Optional parameters must appear after all required parameters
    {
    }
}

Expected Behavior:

Offer fix: "Make 'i2' optional"

public class C {
    public void M(int i1 = 1, int i2 = 0) 
    {
    }
}

Related diagnostic id in VB: BC30202: 'Optional' expected. (and maybe BC30812: Optional parameters must specify a default value. can be fixed by this code fixer too).

Related #23326.

@jinujoseph jinujoseph added this to the Unknown milestone Apr 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants