Bug 10140 – confusing error message: X is private; undefined identifier Y, did you mean X

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-05-23T00:33:00Z
Last change time
2013-08-04T05:07:34Z
Assigned to
nobody
Creator
thelastmammoth

Comments

Comment #0 by thelastmammoth — 2013-05-23T00:33:10Z
---- import std.regex; void main(){ auto c=match(s,``); } ---- Error: module bug std.regex.IR is private bug.d(3): Error: undefined identifier s, did you mean enum IR?
Comment #1 by thelastmammoth — 2013-05-23T00:35:33Z
(In reply to comment #0) > ---- > import std.regex; > void main(){ > auto c=match(s,``); > } > ---- > > Error: module bug std.regex.IR is private > bug.d(3): Error: undefined identifier s, did you mean enum IR? Just to clarify, the bug is that the error message shouldn't even say 'Error: module bug std.regex.IR is private' (which is very confusing). It should just say: Error: undefined identifier s, did you mean enum IR? The second weird thing is that 's' is far from 'IR'; shouldn't it either specify other symbols or put a cap on levinstein distance?
Comment #2 by yebblies — 2013-08-04T05:07:34Z
And also issue 9644 *** This issue has been marked as a duplicate of issue 5839 ***