Needed return type in static method? bug or feature?
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Mar 8 06:13:17 PST 2016
On Tuesday, 8 March 2016 at 13:40:06 UTC, Antonio Corbi wrote:
> Is it a feature or a bug?
It is allowed because the "auto" keyword doesn't actually
required for auto functions (or variables), what you need is any
one of the storage classes.
Those include static, auto, const, immutable, even pure.
If any of them are present, the compiler knows you are writing a
function or declaring a variable and will infer the type.
More information about the Digitalmars-d-learn
mailing list