code-d icon indicating copy to clipboard operation
code-d copied to clipboard

No hints for aliased types.

Open HuskyNator opened this issue 2 years ago • 0 comments

When using an alias to define for example an array or an associative array, hints are not provided when the type of this array is aliased.

module app;
import std.stdio;

struct A {
	int value = 0;
	void print() {
		writeln(value);
	}
}

alias List = A[];

void main() {
	A[] alist1 = [];
	alist1 ~= A();
	// alist1[0]. // Proper hints

	List alist2 = [];
	alist2 ~= A();
	// alist2[0]. // No hints
}

HuskyNator avatar Feb 08 '22 00:02 HuskyNator