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

Wrap Properties is unavailable in recoverable syntax failure conditions #38986

Closed
333fred opened this issue Oct 1, 2019 · 1 comment · Fixed by #59385
Closed

Wrap Properties is unavailable in recoverable syntax failure conditions #38986

333fred opened this issue Oct 1, 2019 · 1 comment · Fixed by #59385
Labels
Area-IDE Concept-Continuous Improvement help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-CodeStyle Built-in analyzers, fixes, and refactorings
Milestone

Comments

@333fred
Copy link
Member

333fred commented Oct 1, 2019

    public class Base
    {
        public Base(int i1, int i2)
        {
        }
    }

    public class Derived : Base
    {
        public Derived(int i1, int i2, int i3) : base (,)
        {

        }
    }

If I invoke ctrl+. on the parameter list of Derived here, I do not get offered a wrap parameter quick fix. Same for an incomplete method where the brackets are missing, but the signature is otherwise there. I understand that we're likely just bailing out in the presence of syntax errors, but it would be nice if we could be a bit smarter here, as offering the wrapping, at least in this scenario, is totally possible and, I think, has a well-defined output.

@333fred 333fred added Area-IDE IDE-CodeStyle Built-in analyzers, fixes, and refactorings labels Oct 1, 2019
@CyrusNajmabadi
Copy link
Member

Yes. Currently we bail out if our parent has any syntax errors. The presumption is that we won't be able to tell how to wrap properly in that case.

What we likely should do is only bail out if our parent has syntax errors between the beginning of it through the end of hte list that we're wrapping. i.e. here:

        [|public Derived(int i1, int i2, int i3)|] : base (,)
        {

        }

Syntax errors after the construct to be wrapped are unlikely to ever be an issue and can be ignored.

@sharwell sharwell added Concept-Continuous Improvement help wanted The issue is "up for grabs" - add a comment if you are interested in working on it labels Oct 3, 2019
@sharwell sharwell added this to the Backlog milestone Oct 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Concept-Continuous Improvement help wanted The issue is "up for grabs" - add a comment if you are interested in working on it IDE-CodeStyle Built-in analyzers, fixes, and refactorings
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants