www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18594] New: constant 1 is not an lvalue should have a better

https://issues.dlang.org/show_bug.cgi?id=18594

          Issue ID: 18594
           Summary: constant 1 is not an lvalue should have a better error
                    message
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: greensunny12 gmail.com

---
void main() {
    assert(1 = 2);
}
---

currently errors with "foo.d(2): Error: constant 1 is not an lvalue".
The error message should be better: (1) not mention lvalue and (2) suggesting
`==`.

--
Mar 11 2018