| 1 |
/* |
| 2 |
EXTRA_FILES: imports/test20267.d |
| 3 |
TEST_OUTPUT: |
| 4 |
--- |
| 5 |
fail_compilation/test20267.d(20): Error: variable `string` is used as a type |
| 6 |
fail_compilation/test20267.d(19): variable `string` is declared here |
| 7 |
fail_compilation/test20267.d(23): Error: variable `boolean` is used as a type |
| 8 |
fail_compilation/test20267.d(22): variable `boolean` is declared here |
| 9 |
fail_compilation/test20267.d(30): Error: variable `array` is used as a type |
| 10 |
fail_compilation/test20267.d(28): variable `array` is imported here from: `imports.test20267` |
| 11 |
fail_compilation/imports/test20267.d(3): variable `array` is declared here |
| 12 |
--- |
| 13 |
*/ |
| 14 |
|
| 15 |
alias boolean = bool; |
| 16 |
|
| 17 |
void foo(string[] args) |
| 18 |
{ |
| 19 |
immutable string = "bar"; |
| 20 |
string[] args2 = args; |
| 21 |
|
| 22 |
bool boolean = true; |
| 23 |
boolean b = false; |
| 24 |
} |
| 25 |
|
| 26 |
void bar() |
| 27 |
{ |
| 28 |
import imports.test20267 : array; |
| 29 |
|
| 30 |
array foo; |
| 31 |
} |