January 19, 2008 Change in treatement of array literals | ||||
---|---|---|---|---|
| ||||
Previously, this worked just fine: int[] buf = [1,2,3,4].dup; Now, this line gives the error: semicolon expected, not '.' In order to duplicate array literals, they must now be enclosed in parens: int[] buf = ([1,2,3,4]).dup; Is this intended? And if so, why the change? Sean |
Copyright © 1999-2021 by the D Language Foundation