dmd icon indicating copy to clipboard operation
dmd copied to clipboard

typeof((int[]).front) produces invalid suggestion

Open Herringway opened this issue 7 months ago • 1 comments

import std.range : front;
typeof((int[]).front);

As of DMD 2.111.0, this code produces this error: Error: no property front for type int[], perhaps import std.range; is needed? The error is correct, but the suggestion is not. The import only helps for symbols, not types.

Herringway avatar Apr 10 '25 06:04 Herringway

Surely (int[]).front is wrong - (Type).Identifier only works for type properties.

Edit: Sorry, you are correct that the suggestion is wrong.

ntrel avatar Apr 12 '25 15:04 ntrel