On 7/13/2012 3:21 AM, Marco Leise wrote:
The cases of 'auto' return or assignment can be worked around by not using
auto and may be artificial. Yet it feels like auto is partially broken,
because I cannot directly write down 8- and 16-bit integer literals like so:

auto code(...) { if (...) return 42us; return 123us; } immutable Magic =
0x1234us;

   auto code() { return cast(ushort)42; }

works fine. There isn't really a lack here, just some more typing. I just don't see the case coming up hardly at all.



Reply via email to