digitalmars.D.bugs - [Issue 856] New: foreach doesn't work when accessing elements as supertypes
- d-bugmail puremagic.com (30/30) Jan 19 2007 http://d.puremagic.com/issues/show_bug.cgi?id=856
- d-bugmail puremagic.com (12/12) Jan 15 2010 http://d.puremagic.com/issues/show_bug.cgi?id=856
http://d.puremagic.com/issues/show_bug.cgi?id=856 Summary: foreach doesn't work when accessing elements as supertypes Product: D Version: 1.00 Platform: PC URL: http://dstress.kuehne.cn/run/c/cast_29_B.d OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: braddr puremagic.com module dstress.run.c.cast_29_B; class Foo{ } class Bar : Foo{ } int main(){ Bar[] bars=new Bar[100]; foreach(Foo f; bars){ return 0; } assert(0); } $ dmd cast_29_B.d cast_29_B.d(12): Error: foreach: Bar[] is not an array of dstress.run.c.cast_29_B.Foo --
Jan 19 2007
http://d.puremagic.com/issues/show_bug.cgi?id=856 Alexey Ivanov <aifgi90 gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |aifgi90 gmail.com Resolution| |WORKSFORME --- Comment #1 from Alexey Ivanov <aifgi90 gmail.com> 2010-01-15 17:02:56 PST --- Works in dmd 1.055 and dmd 2.039 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 15 2010