Bug 15307 – Delegate with immutable and shared context do not convert to one another

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-11-09T12:24:02Z
Last change time
2024-12-13T18:45:44Z
Assigned to
No Owner
Creator
Jakob Ovrum
Moved to GitHub: dmd#19068 →

Comments

Comment #0 by jakobovrum — 2015-11-09T12:24:02Z
void main() { immutable i = 42; auto dg = delegate void() immutable { auto inner = i; }; void delegate() shared dg2 = dg; // Fails } --- This might be a useful conversion to have for non-templated functions like std.concurrency.Scheduler.spawn (which currently does not enforce shared/immutable context).
Comment #1 by dfj1esp02 — 2015-11-09T13:35:04Z
Delegates don't have context qualifier, see issue 1983.
Comment #2 by robert.schadek — 2024-12-13T18:45:44Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19068 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB