January 19, 2007 [Issue 856] New: foreach doesn't work when accessing elements as supertypes | ||||
---|---|---|---|---|
| ||||
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 -- |
January 16, 2010 [Issue 856] foreach doesn't work when accessing elements as supertypes | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | 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: ------- |
Copyright © 1999-2021 by the D Language Foundation