digitalmars.D.bugs - Using 'return new int[];'
- D. Trebbien (10/10) May 30 2005 Is this a bug?
- Stewart Gordon (9/21) May 31 2005 Several syntaxes have been proposed for array literals. Including
Is this a bug? int[] getStuff() { return new int[]; } If not, maybe it should be added to the spec? This would also be nice: int[] getStuff() { return new int[] [3,2,1,-4]; }
May 30 2005
D. Trebbien wrote:Is this a bug? int[] getStuff() { return new int[]; }Where did you find that code? What do you think it should be instead?If not, maybe it should be added to the spec? This would also be nice: int[] getStuff() { return new int[] [3,2,1,-4]; }Several syntaxes have been proposed for array literals. Including yours, which is syntactically ambiguous. http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D/4065 Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
May 31 2005