www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18460] New: Improve error message for missing 'new' for class

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

          Issue ID: 18460
           Summary: Improve error message for missing 'new' for class
                    instantiation
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: greensunny12 gmail.com

---
class Foo {}

void main() {
    auto f = Foo();
}
---

prints:

---
onlineapp.d(4): Error: no property 'opCall' for type 'onlineapp.Foo'
---


Imho this could vastly be improved. PR incoming.

--
Feb 18 2018