[Issue 14077] Letting compiler determine length for fixed-length arrays in return type
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Jan 29 07:39:09 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14077
monkeyworks12 at hotmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |monkeyworks12 at hotmail.com
--- Comment #1 from monkeyworks12 at hotmail.com ---
(In reply to Kenji Hara from comment #0)
> Possible case:
>
> int[$] returnSArr()
> {
> return [1, 2];
> }
Also consider the following:
auto[$] returnSArr()
{
return [1, 2];
}
const[$] returnSArr()
{
return [1, 2];
}
//Etc.
int[auto] returnAA()
{
return ["asdf":1];
}
auto[auto] returnAA()
{
return ["asdf":1];
}
immutable[auto[$]] returnAA()
{
return [[1, 2]:1];
}
--
More information about the Digitalmars-d-bugs
mailing list