Bug 14320 – Improve diagnostic message for "undefined identifier" error

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-03-23T08:42:00Z
Last change time
2017-07-02T17:13:20Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2015-03-23T08:42:39Z
-- gui/widgget.d ----- module gui.widget; class Style {} // originally existed in gui.style class Widget { Style style() {} void layoutChildren(bool fit, Widget positionReference) {} } ---- -- controls/tree.d --- module controls.tree; import gui.widget; class Tree : Widget { override void layoutChildren(bool fit, Widget positionReference) { gui.style.Style st = style; // line 9 } } ---- The error diagnostic is: controls/tree.d(9): Error: undefined identifier 'style' It actually explains the unexistent of module 'gui.style' in package 'gui', but it sounds like the explanation for the invisibility of Widget.style() function. I think it should be improved as follows: controls/tree.d(9): Error: undefined identifier 'gui.style' in package 'gui'
Comment #1 by k.hara.pg — 2015-03-23T08:59:49Z
Comment #2 by github-bugzilla — 2015-03-27T10:33:22Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6d4c8492fb3c9879b918560afbb29133625ca122 fix Issue 14320 - Improve diagnostic message for "undefined identifier" error https://github.com/D-Programming-Language/dmd/commit/36059423f3b4a839455d6cc42c560ee33ce353fb Merge pull request #4510 from 9rnsr/fix14320 Issue 14320 - Improve diagnostic message for "undefined identifier" error
Comment #3 by github-bugzilla — 2015-06-17T21:02:42Z
Comment #4 by dlang-bugzilla — 2017-07-02T17:13:20Z
*** Issue 12059 has been marked as a duplicate of this issue. ***