Bug 18323 – deprecate `void fun(this a)` (instead: typeof(this)) ; `var.init` (instead: typeof(var).init)

Status
NEW
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2018-01-28T08:35:05Z
Last change time
2024-12-13T18:56:29Z
Assigned to
No Owner
Creator
Timothee Cour
Moved to GitHub: dmd#19373 →

Comments

Comment #0 by timothee.cour2 — 2018-01-28T08:35:05Z
we should deprecate `void fun(this a)` (instead: void fun(typeof(this)a)) ; likewise, we should deprecate `var.init` (instead: typeof(var).init) more controversial: we may also want to deprecate `instance.static_methor();` it's confusing and lax, and leads to behavior that confuses some users, see [The daily D riddle]: https://www.mail-archive.com/[email protected]/msg230090.html
Comment #1 by razvan.nitu1305 — 2023-05-11T10:15:12Z
`this a` is an error now, however, the init on the variable still works.
Comment #2 by robert.schadek — 2024-12-13T18:56:29Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19373 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB