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

* Tweak punctuation for 3 error messages Fix Issue 13656 - clarify error when trying to declare a variable of type ref. Tweak 2 inout errors. * Use hyphen & fix `auto Type` error too
20 lines
555 B
D
20 lines
555 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail253.d(13): Error: variable `fail253.main.x` - `inout` variables can only be declared inside `inout` functions
|
|
fail_compilation/fail253.d(16): Error: cannot modify `inout` expression `x`
|
|
fail_compilation/fail253.d(19): Error: variable `fail253.main.err11` - `inout` variables can only be declared inside `inout` functions
|
|
---
|
|
*/
|
|
void main()
|
|
{
|
|
foreach (i; 0 .. 2)
|
|
{
|
|
foreach (inout char x; "hola")
|
|
{
|
|
//printf("%c", x);
|
|
x = '?';
|
|
}
|
|
}
|
|
inout(int)* err11;
|
|
}
|