dmd
dmd copied to clipboard
Wrong location for "not a member" error when constructing a struct literal
struct S { int x; }
void test() {
auto s = S(
y:
1
);
}
Output:
test.d(6): Error: `y` is not a member of `S`
The error is reported on the line with the value (1), but the undefined identifier in question is actually on the previous line.