[Issue 19972] New: no shadowing error for nested functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jun 16 02:13:58 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19972
Issue ID: 19972
Summary: no shadowing error for nested functions
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: iamthewilsonator at hotmail.com
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
--
More information about the Digitalmars-d-bugs
mailing list