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

Better constructor shortcuts #14

Open
JimmyCushnie opened this issue Mar 30, 2019 · 0 comments
Open

Better constructor shortcuts #14

JimmyCushnie opened this issue Mar 30, 2019 · 0 comments
Labels
feature/enhancement New feature or request

Comments

@JimmyCushnie
Copy link
Owner

JimmyCushnie commented Mar 30, 2019

If a type has two constructors that take the same number of parameters, it chooses whichever comes first for use in constructor shortcuts.

class Example
{
    public Example(int i)
    {

    }
    public Example(string s)
    {

    }
}

if we try to use ("this is a string") as a shortcut for an Example, there will be an error as it will try to use the int shortcut. What should happen is that if there are multiple constructors with the same number of parameters, it keeps trying them until either there is no error or all constructors have been tried.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant