Bug 22094 – Static members are not accessible via 'alias this' inside the subtype

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-06-30T06:30:29Z
Last change time
2024-12-13T19:17:30Z
Assigned to
No Owner
Creator
Max Samukha
Moved to GitHub: dmd#19958 →

Comments

Comment #0 by maxsamukha — 2021-06-30T06:30:29Z
struct S { static: void foo() { } } struct S2 { static: alias s = S; alias s this; void bar() { foo; // fails, should pass } } void main() { S2.foo; // passes as expected } onlineapp.d(11): Error: undefined identifier `foo`
Comment #1 by robert.schadek — 2024-12-13T19:17:30Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19958 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB