Bug 10277 – Incorrect error file and line on redeclaration of TypeInfo
Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-05T12:25:00Z
Last change time
2013-09-21T09:17:08Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
robert
Comments
Comment #0 by robert — 2013-06-05T12:25:07Z
Test case:
test.d:
----
class TypeInfo {}
----
test2.d:
----
import test;
----
$ dmd test2.d
/usr/include/d/druntime/import/object.di(67): Error: class object.TypeInfo only object.d can define this reserved class name
It should report line 1 of test2.d.
$ dmd -v | head -n2
DMD64 D Compiler v2.063
Copyright (c) 1999-2012 by Digital Mars written by Walter Bright
Comment #1 by robert — 2013-06-05T12:25:58Z
The issue occurs with other reserved names such as Throwable, Exception and Error too.