D_Parser icon indicating copy to clipboard operation
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.

Open Sewer56 opened this issue 7 years ago • 2 comments

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): Image 1

Different scope (passed as function parameter): Image 2

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:

Image 3

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

Sewer56 avatar Jul 15 '18 13:07 Sewer56

Hey there, okay, let me reactivate my D_Parser dev environment. Hopefully I can build a Unittest around this issue :)

aBothe avatar Jul 17 '18 16:07 aBothe

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.

aBothe avatar Aug 03 '18 08:08 aBothe