Bug 9312 – with statement error message is wrong

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-13T11:03:00Z
Last change time
2013-01-13T23:10:08Z
Keywords
diagnostic, pull
Assigned to
andrej.mitrovich
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2013-01-13T11:03:22Z
void main() { with (1) { } } $ dmd test.d > Error: with expressions must be class objects, not 'int' Should be: Error: with expressions must be class or struct objects, not 'int'
Comment #1 by andrej.mitrovich — 2013-01-13T11:06:08Z
Comment #2 by andrej.mitrovich — 2013-01-13T19:07:17Z
Actually it shouldn't list anything because there's too much to list, e.g. structs, classes, modules, enums, etc.
Comment #3 by k.hara.pg — 2013-01-13T23:10:08Z