[Issue 11772] New: Can't call function with `inout` `delegate` as argument
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Dec 19 06:38:33 PST 2013
https://d.puremagic.com/issues/show_bug.cgi?id=11772
Summary: Can't call function with `inout` `delegate` as
argument
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: verylonglogin.reg at gmail.com
--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-12-19 18:38:31 MSK ---
This code should compile:
---
alias T = inout(int*) delegate(inout int*);
void f(T) { }
void main()
{
T del;
f(del); // line 8
}
---
main.d(8): Error: cannot implicitly convert expression (del) of type
inout(int*) delegate(inout(int*)) to const(int*) delegate(const(int*))
---
In spite of the error `const(int*) delegate(const int*)` doesn't work either.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list