Bug 23371 – Error Message For Using Non-static members Statically Could Be Better

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-09-24T16:52:53Z
Last change time
2024-12-13T19:24:44Z
Assigned to
No Owner
Creator
Jack Stouffer
Moved to GitHub: dmd#18125 →

Comments

Comment #0 by jack — 2022-09-24T16:52:53Z
struct Foo { int a; } void main() { Foo.a; } Gives the error onlineapp.d(8): Error: need `this` for `a` of type `int` If possible, I'd like something like this onlineapp.d(8): Error: `a` of type `Foo` is not a static member and needs a `this` pointer
Comment #1 by robert.schadek — 2024-12-13T19:24:44Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18125 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB