www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 441] New: Crash on foreach of mixed-in aggregate.

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=441

           Summary: Crash on foreach of mixed-in aggregate.
           Product: D
           Version: 0.171
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: brunodomedeiros+bugz gmail.com


Crash on foreach of mixed-in aggregate (only if the mixin instance is named): 

---- ----

template opHackedApply() {
    struct Iter {
    }
}

class Foo {
    mixin opHackedApply!() oldIterMix;
}

void main() {
    Foo f = new Foo;
    foreach (i; f.oldIterMix.Iter) {  }
}


-- 
Oct 18 2006
next sibling parent reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=441





------- Comment #1 from braddr puremagic.com  2006-10-18 12:15 -------
*** Bug 442 has been marked as a duplicate of this bug. ***


-- 
Oct 18 2006
parent reply Bruno Medeiros <brunodomedeiros+spam com.gmail> writes:
d-bugmail puremagic.com wrote:
 http://d.puremagic.com/issues/show_bug.cgi?id=441
 
 
 
 
 
 ------- Comment #1 from braddr puremagic.com  2006-10-18 12:15 -------
 *** Bug 442 has been marked as a duplicate of this bug. ***
 
 

Now that's a duplicate... literally :P I wonder how it happened, tough. -- Bruno Medeiros - MSc in CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
Oct 19 2006
parent Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
Bruno Medeiros wrote:
 d-bugmail puremagic.com wrote:
 http://d.puremagic.com/issues/show_bug.cgi?id=441





 ------- Comment #1 from braddr puremagic.com  2006-10-18 12:15 -------
 *** Bug 442 has been marked as a duplicate of this bug. ***

Now that's a duplicate... literally :P I wonder how it happened, tough.

Most likely an accidental double "submit" click or something like that.
Oct 19 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=441


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME




------- Comment #3 from bugzilla digitalmars.com  2006-11-21 23:08 -------
Works in DMD 0.174, producing the (correct) error message:

test.d(12): Error: cannot infer type for i


-- 
Nov 21 2006