Comment #0 by ellery-newcomer — 2011-01-08T19:31:58Z
In spec and implementation, auto decls are defined as
StorageClasses Identifier = Initializer, etc ;
However, as near as I can tell, Initializer could be replaced with Expression with no loss, as none of the initializer forms disjoint from Expression allow type deduction.
You could argue that something like this could work:
auto x = [s, {a:1,b:2,c:3}];
but it doesn't. Maybe you could argue for the indexed initializers like:
int[] x = [4,1:2];
but thankfully, that isn't implemented for auto decls either.
It really doesn't make sense to have the compiler parse things which will never pass semantic analysis, so I propose that both spec and implementation be changed to
StorageClasses Identifier = Expression, etc ;
Comment #1 by robert.schadek — 2024-12-15T15:21:41Z