D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 19972 - no shadowing error for nested functions
Summary: no shadowing error for nested functions
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P3 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-16 02:13 UTC by Nicholas Wilson
Modified: 2024-12-13 19:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Nicholas Wilson 2019-06-16 02:13:58 UTC
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
Comment 1 dlangBugzillaToGithub 2024-12-13 19:04:00 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/19585

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB