[Issue 18809] New: Improve error message on nonexistent property

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Apr 29 12:04:45 UTC 2018


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

          Issue ID: 18809
           Summary: Improve error message on nonexistent property
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: dlang at ryanjframe.com

The following code:

---
struct SomeStruct {}

void main() {
    auto s = SomeStruct();
    s.nonexistent = "hello";
}
---

yields the error message:

"source\app.d(5,6): Error: no property nonexistent for type SomeStruct"

Here, that's not a problem. But if SomeStruct was defined in another module,
especially in a large or unfamiliar project, it would be helpful to have the
fully qualified name to quickly identify the location of the type's definition:

"source\app.d(5,6): Error: no property nonexistent for type app.SomeStruct"

--


More information about the Digitalmars-d-bugs mailing list