Possible regression in latest? dmd with inherited inner classes
Arafel
er.krali at gmail.com
Tue May 14 15:35:15 UTC 2019
Hi,
I have found the following regression with the latest dmd:
https://run.dlang.io/is/4KdP5s
```
class A {
class I { }
}
class B : A {
C c;
class II : I {
void fun() {
c = new C();
}
}
}
class C { }
void main() { }
```
When tried with the latest DMD it fails with
> onlineapp.d(10): Error: need this for c of type onlineapp.C
When I try "All dmd compilers" however I get
> All versions: Success and no output
So I can't pinpoint the exact version, although I assume it'd be the
latest one. ldc and ldc-beta compile it without problems.
I think this a bug because if I remove the inheritance of II : I, then
it works without issue.
A.
More information about the Digitalmars-d
mailing list