[Issue 24088] A nested function that returns a tuple that is written with short syntax function does not want to compile.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Aug 16 20:07:17 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=24088
Nick Treleaven <nick at geany.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nick at geany.org
--- Comment #1 from Nick Treleaven <nick at geany.org> ---
Reduced:
```
import std.typecons;
void main()
{
// Error: found `opp` when expecting `;` following statement `Tuple!(int,
int)` on line
Tuple!(int, int) opp(int x, int y) => tuple(x + y, x - y); // no ok
}
```
BTW that error message has been improved in git master, it now says:
ft.d(12): Error: found `opp` when expecting `;` following expression
ft.d(12): expression: `Tuple!(int, int)`
--
More information about the Digitalmars-d-bugs
mailing list