[Issue 14320] New: Improve diagnostic message for "undefined identifier" error
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Mar 23 01:42:39 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14320
Issue ID: 14320
Summary: Improve diagnostic message for "undefined identifier"
error
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: diagnostic
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: k.hara.pg at gmail.com
-- 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'
--
More information about the Digitalmars-d-bugs
mailing list