[Issue 10243] [CTFE] Wrong-code on passing dereferenced array pointer by ref
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 18 02:27:30 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10243
Denis Shelomovskij <verylonglogin.reg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #2 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-06-18 13:27:25 MSD ---
Original testcase still fails. Another reduced testcase:
---
void f(ref ubyte n)
{ n = 1; }
void g(ubyte* p)
{ f(p[0]); }
void test()
{
ubyte[1] arr;
//f(*arr.ptr); // now works
g(arr.ptr);
assert(arr == [1]);
}
void main()
{
test();
static assert((test(), true));
}
---
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list