Bug 23921 – The compiler is too pessimistic on how a double context might be required

Status
NEW
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-05-13T17:22:33Z
Last change time
2024-12-13T19:29:01Z
Assigned to
No Owner
Creator
basile-z
See also
https://issues.dlang.org/show_bug.cgi?id=14581
Moved to GitHub: dmd#20282 →

Comments

Comment #0 by b2.temp — 2023-05-13T17:22:33Z
The following code ``` class A { void f() { class B : A { override void f() { class C : B { override void f() { class D : C { override void f() { } } D abcd; } } C abc; } } B ab; } } ``` is rejected with > A.f.B.f.C` is nested within `f`, but super class `B` is nested within `f` But the very similar ``` class A { void f() { static class B : A { override void f() { static class C : B { override void f() { static class D : C { override void f() { } } D abcd; } } C abc; } } B ab; } } ``` is accepted.
Comment #1 by robert.schadek — 2024-12-13T19:29:01Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20282 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB