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: [email protected]
Reporter: [email protected]
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
--