Bug 15161 – No way to express ref delegate

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-10-05T20:05:19Z
Last change time
2024-12-13T18:45:09Z
Assigned to
No Owner
Creator
Hexagonalstar64
Moved to GitHub: dmd#19055 →

Comments

Comment #0 by Hexagonalstar64 — 2015-10-05T20:05:19Z
--- ref int delegate() var; --- Doesn't parse
Comment #1 by b2.temp — 2019-03-21T09:31:53Z
It parses, the error is output during dsymbol semantic. The ref is not a MemberFunctionAttribute it's a storage class of the type of a VarDeclaration, which is a noop. The ref you want would actually have to placed after the `delegate()`, as a MemberFunctionAttribute, but this is illegal.
Comment #2 by robert.schadek — 2024-12-13T18:45:09Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19055 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB