mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00

* Fix issue 20369 - shadowed variable in foreach loop always considered "foreach variable" * Remove unintuitive phrase in deprecation message * Fix deprecation message in test * Add original variable's line information in deprecation (error) message
16 lines
237 B
D
16 lines
237 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/diag11425.d(14): Error: variable `x` is shadowing variable `diag11425.main.x`
|
|
fail_compilation/diag11425.d(11): declared here
|
|
---
|
|
*/
|
|
|
|
void main()
|
|
{
|
|
int x;
|
|
|
|
{
|
|
int x = 1;
|
|
}
|
|
}
|