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

no shadowing error for nested functions #19585

Open
dlangBugzillaToGithub opened this issue Jun 16, 2019 · 0 comments
Open

no shadowing error for nested functions #19585

dlangBugzillaToGithub opened this issue Jun 16, 2019 · 0 comments

Comments

@dlangBugzillaToGithub
Copy link

Nicholas Wilson (@thewilsonator) reported this on 2019-06-16T02:13:58Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=19972

Description

float x;
void test()
{
    short x;
    void nested() const
    {
        int x;
        pragma(msg, typeof(.x)); // float - fine disambiguated with leading .
        pragma(msg, typeof( x)); // int - ?? should give error
    }
}


this should give an error that the int x shadows the short x
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

1 participant