[Issue 12523] New: false type deduced with inout append
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 5 02:15:04 PDT 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12523
Summary: false type deduced with inout append
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: code at dawg.eu
--- Comment #0 from Martin Nowak <code at dawg.eu> 2014-04-05 02:14:56 PDT ---
cat > bug.d << CODE
inout(T)[] dup(T)(inout(T)[] a)
{
inout(T)[] res;
foreach (ref e; a) // works without ref
res ~= e;
return res;
}
struct S
{
void *p;
}
void foo()
{
S[] m;
m = dup(m);
}
CODE
dmd -c bug.d
----
Error: cannot append type inout(const(S)) to type inout(S)[]
----
--
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