digitalmars.D.bugs - [Issue 5436] New: tightening auto decl spec
- d-bugmail puremagic.com (30/30) Jan 08 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5436
http://d.puremagic.com/issues/show_bug.cgi?id=5436 Summary: tightening auto decl spec Product: D Version: unspecified Platform: Other OS/Version: Linux Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: ellery-newcomer utulsa.edu 19:31:58 PST --- 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 ; -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 08 2011