Thread overview
[Issue 441] New: Crash on foreach of mixed-in aggregate.
Oct 18, 2006
d-bugmail
Oct 18, 2006
d-bugmail
Oct 19, 2006
Bruno Medeiros
Oct 19, 2006
Frits van Bommel
Nov 22, 2006
d-bugmail
October 18, 2006
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) {  }
}


-- 

October 18, 2006
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. ***


-- 

October 19, 2006
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
October 19, 2006
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.
November 22, 2006
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


--