gcc/testsuite/gdc.test/fail_compilation/fail93.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/fail93.d(14): Error: variable `i` is shadowing variable `fail93.main.i` |
| 5 | fail_compilation/fail93.d(13): declared here |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | // accepts-valid with DMD0.120. volatile as well as synchronized |
| 10 | |
| 11 | void main() |
| 12 | { |
| 13 | int i = 1; |
| 14 | synchronized int i = 2; // should fail to compile |
| 15 | } |