digitalmars.D.bugs - [Issue 6939] New: shared pointers are type combined incorrectly
- d-bugmail puremagic.com (25/25) Nov 12 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6939
- d-bugmail puremagic.com (23/23) Nov 12 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6939
- d-bugmail puremagic.com (14/14) Nov 12 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6939
- d-bugmail puremagic.com (12/12) Nov 12 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6939
- d-bugmail puremagic.com (10/10) Dec 19 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6939
- d-bugmail puremagic.com (12/12) Dec 20 2011 http://d.puremagic.com/issues/show_bug.cgi?id=6939
http://d.puremagic.com/issues/show_bug.cgi?id=6939 Summary: shared pointers are type combined incorrectly Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: timon.gehr gmx.ch --- Comment #0 from timon.gehr gmx.ch 2011-11-12 10:54:30 PST --- Tested with DMD 2.056 shared int* x; immutable int* y; const int* z; static assert(is(typeof(1?x:y) == shared(const(int))*)); // fail. static assert(!is(typeof(1?x:y) == const(int)*)); // fail. static assert(is(typeof(1?x:z) == shared(const(int))*)); // fail. static assert(!is(typeof(1?x:z) == const(int)*)); // fail. All static assertions should pass. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 12 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6939 --- Comment #1 from timon.gehr gmx.ch 2011-11-12 11:50:15 PST --- Oops. Obviously x and z should not have a common type at all. So the third static assertion should not pass. (it currently fails for the wrong reason though). Replace the test with this: shared int* x; immutable int* y; const int* z; static assert(is(typeof(1?x:y) == shared(const(int))*)); // fail static assert(!is(typeof(1?x:y) == const(int)*)); // fail static assert(!is(typeof(1?x:z))); // fail shared int[] a; immutable int[] b; const int[] c; static assert(is(typeof(1?a:b) == shared(const(int))[])); // pass (ok) static assert(!is(typeof(1?a:b) == const(int)[])); // pass (ok) static assert(!is(typeof(1?x:z))); // fail All of these should pass. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 12 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6939 timon.gehr gmx.ch changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid, | |rejects-valid Summary|shared pointers are type |wrong type qualifier |combined incorrectly |combination --- Comment #2 from timon.gehr gmx.ch 2011-11-12 11:54:47 PST --- ... static assert(!is(typeof(1?a:c))); // fail -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 12 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6939 --- Comment #3 from timon.gehr gmx.ch 2011-11-12 12:02:03 PST --- inout is buggy too: inout and shared are combined to shared const. inout(int[]) foo(inout int[] x, shared int[] y, inout int* a, shared int* b){ static assert(!is(typeof(1?x:y))); // fail static assert(!is(typeof(1?a:b))); // fail return x; } Both assertions should pass. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Nov 12 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6939 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch --- Comment #4 from Kenji Hara <k.hara.pg gmail.com> 2011-12-19 07:11:08 PST --- https://github.com/D-Programming-Language/dmd/pull/571 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 19 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6939 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |FIXED --- Comment #5 from Walter Bright <bugzilla digitalmars.com> 2011-12-20 13:02:38 PST --- https://github.com/D-Programming-Language/dmd/commit/06fe1ce97ef56cb86821114024c55f8d5fe0073c -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Dec 20 2011