https://issues.dlang.org/show_bug.cgi?id=14391
Issue ID: 14391
Summary: Assigning to module results in unhelpful error message
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: diagnostic
Severity: enhancement
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
/// a.d ///
module a;
int a;
/// b.d ///
import a;
void main()
{
a = 42;
}
///////////
Compiler says:
b.d(4,5): Error: a is not an lvalue
Ideally, it should say something along:
b.d(4,5): Error: cannot assign to module "a", did you mean "a.a" of type "int"?
--