digitalmars.D.bugs - [Issue 10583] New: DMD 2.063 dumps core with mixins involving __traits(getProtection, ..
- d-bugmail puremagic.com (62/62) Jul 09 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10583
- d-bugmail puremagic.com (10/10) Jul 19 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10583
- d-bugmail puremagic.com (13/13) Jul 20 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10583
- d-bugmail puremagic.com (10/10) Jul 20 2013 http://d.puremagic.com/issues/show_bug.cgi?id=10583
http://d.puremagic.com/issues/show_bug.cgi?id=10583 Summary: DMD 2.063 dumps core with mixins involving __traits(getProtection, .. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: puneet coverify.org --- Here is the test code. On compiling I get: dmd: traits.c:288: virtual Expression* TraitsExp::semantic(Scope*): Assertion `protName' failed. Aborted (core dumped) Also note that if I uncomment line 37 and comment out line 36, dmd compiles the code smoothly. ///////////// Test Code starts here enum sync; // 1 // 2 public template get_sync(size_t I, A...) { // 3 static if(I == A.length) // 4 enum bool get_sync = false; // 5 else static if(is(A[I] == sync)) // 6 enum bool get_sync = true; // 7 else // 8 enum bool get_sync = get_sync!(I+1, A); // 9 } // 10 // 11 template add_sync(T, size_t ITER=0) { // 12 static if(ITER == (__traits(derivedMembers, T).length)) { // 13 enum string add_sync = ""; // 14 } else { // 15 enum string mem = __traits(derivedMembers, T)[ITER]; // 16 enum string add_sync = // 17 "mixin(add_sync!(get_sync!(0, __traits(getAttributes, " // 18 ~ mem ~ ")), __traits(getProtection, " // 19 ~ mem ~ "), \"" ~ mem ~ "\")); " ~ add_sync!(T, ITER+1); // 20 } // 21 } // 22 // 23 template add_sync(bool A, string P, string M) { // 24 static if(A) { // 25 enum string add_sync = " auto " ~ M[1..$] ~ // 26 "() {synchronized(this) return " ~ M ~ ";}"; // 27 } else { // 28 enum string add_sync = ""; // 29 } // 30 } // 31 // 32 class derived { // 33 mixin(add_sync!(derived)); // 34 sync private bool _bar; // 35 void frop() {} // 36 // private void frop() {} // 37 } // 38 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 09 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10583 Kenji Hara <k.hara.pg gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice, pull https://github.com/D-Programming-Language/dmd/pull/2362 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 19 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10583 Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/8437f1993cd1924e423cddcda45d83fdb41f0a96 fix Issue 10583 - DMD 2.063 dumps core with mixins involving __traits(getProtection) https://github.com/D-Programming-Language/dmd/commit/671b7c20b96b580ee1dc2b3f5e3ee66c63d079b6 Issue 10583 - DMD 2.063 dumps core with mixins involving __traits(getProtection) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 20 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10583 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |FIXED -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jul 20 2013