mirror of
https://github.com/dlang/dmd.git
synced 2025-04-25 12:40:11 +03:00
12 lines
343 B
Text
12 lines
343 B
Text
Keywords `auto` and `ref` must be adjacent for `auto ref` return.
|
|
|
|
Similar to `auto ref` parameters in 2.111, it's now deprecated to declare an `auto ref` return type without putting those two keywords next to each other as well.
|
|
|
|
---
|
|
ref auto int f() => 3;
|
|
auto { ref int g() => 3; }
|
|
|
|
// Correction:
|
|
auto ref f() => 3;
|
|
auto ref g() => 3;
|
|
---
|