Bug 3623 – Cannot mixin templated classes with inner classes
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2009-12-16T20:45:00Z
Last change time
2015-05-19T00:29:17Z
Keywords
rejects-valid
Assigned to
nobody
Creator
mike.linford.reg
Comments
Comment #0 by mike.linford.reg — 2009-12-16T20:45:19Z
The following does not compile (with -version=broken):
class A(T)
{
version(broken)
{
class B
{
T blah() { return t; }
}
}
T t;
}
mixin A!(int);
int main()
{
A!(int) a = new A!(int)();
return 0;
}
and gives the errors:
Error: this for t needs to be type A not type test2.A!(int).A
Error: class test2.A!(int).A member t is not accessible
Error: template instance test2.A!(int) error instantiating
However, it does compile if B.blah() is changed to: return this.outer.t
Comment #1 by dlang-bugzilla — 2015-05-19T00:29:17Z