[Issue 12524] New: wrong type with inout const arg and inout return
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 5 03:57:13 PDT 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12524
Summary: wrong type with inout const arg and inout return
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 03:57:10 PDT ---
cat > bug.d << CODE
inout(int) dup(inout(const(int)) val)
{
return val;
}
pragma(msg, typeof(dup));
void foo(inout(int))
{
inout(const(int)) val;
auto bug = dup(val);
pragma(msg, typeof(bug));
static assert(is(typeof(bug) == inout(int)));
}
CODE
dmd -c bug
----
Error: static assert (is(inout(const(int)) == inout(int))) is false
----
Interestingly enough the type of the function is correct, but the type of the
call expression remains inout(const(int)).
--
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