[Issue 16394] TypeInfo.init() for static arrays returns single element instead of whole array

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Tue Aug 16 07:44:06 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16394

--- Comment #19 from Steven Schveighoffer <schveiguy at yahoo.com> ---
(In reply to Eyal from comment #17)
> Yeah, I've since figured it out - but was surprised because it is
> inconsistent with code blocks like: x=>x+1 which is inferred to be a
> function, not a delegate.  So I expected structs to be similarly inferred to
> static structs when they do not actually need the context ptr.

I was with you on that recently when dealing with Voldemort types. But static
must be added to make it a non-nested struct, even if you don't use any of the
function locals.

Worth an enhancement request probably.

--


More information about the Digitalmars-d-bugs mailing list