D_Parser
D_Parser copied to clipboard
[Visual D] Certain templates such as std.container.array.Array do not show suggestions/autocompletions when in different scope to where it was instantiated.
This is a very simple to describe issue that I have come across when I have started off programming with D in a Visual D environment:
When the scope of a template instantiated item differs from the scope of when it was instantiated, there is a lack of suggestions from the parser.
A set of images would best suffice to explain.
Same scope as in instantiation (destination is defined in the same method):

Different scope (passed as function parameter):

This can also be very easily replicated in an empty, clean module - no suggestions appear when accessing a template instantiated item in a different scope:

This can also be replicated by trying to access a module level variable from a method:

Hey there, okay, let me reactivate my D_Parser dev environment. Hopefully I can build a Unittest around this issue :)
Ah, now I think I got it. (Quite obvious somewhat, though)
It's the import which is missing.
In decompress.d, you've got std.container.array imported.