[Issue 1418] New: tupleof bug on nested classes
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Aug 13 04:07:50 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1418
Summary: tupleof bug on nested classes
Product: D
Version: 1.020
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: spec
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: yanikibo at gmail.com
.tupleof accesses an extra (unknown) member on nested classes.
The following example shows this bug on dmd 1.020 and 2.003, also gdc gives a
similar result
--- main.d ---
import std.stdio;
class A
{
char name = 'A';
class B
{
char name = 'B';
}
}
void main()
{
class C
{
char name = 'C';
}
A a = new A;
a.B b = a.new B;
C c = new C;
writefln(a.tupleof); // prints: A
writefln(b.tupleof); // prints: B main.A
writefln(c.tupleof); // prints: C 0000
}
--
More information about the Digitalmars-d-bugs
mailing list