On Fri, 05 Jun 2015 09:44:09 +0000, Marc Schütz wrote: > On Friday, 5 June 2015 at 04:39:28 UTC, ketmar wrote: >> On Fri, 05 Jun 2015 03:56:05 +0000, anonymous wrote: >> >>> On Friday, 5 June 2015 at 03:45:18 UTC, ketmar wrote: >>>> `auto int a`?! it shouldn't be accepted at all! >>> >>> Yeah, but it's the same with "auto ref". >> >> `auto ref` has a well-defined meaning. yet `auto int` is nonsence. it's >> definitely a compiler bug. ;-) > > I don't think so. `auto` is a valid storage class like `const`, > `immutable` and `shared`.
p.s. if "auto" is a storage class, the following code should be accepted
(while it isn't):
int foo () { return 42; }
void main () {
auto auto i = foo();
}
as it's logically "an auto-typed var with "auto" storage class".
signature.asc
Description: PGP signature
