[Issue 7851] New: Internal error: e2ir.c 688
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 7 12:21:32 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7851
Summary: Internal error: e2ir.c 688
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: iteronvexor at gmail.com
--- Comment #0 from iteronvexor at gmail.com 2012-04-07 12:22:10 PDT ---
DMD 2.059beta (not head), on a 64-bit GNU/Linux
---------------->8---------------->8----------------
import std.typecons;
import std.stdio;
void main() {
alias Tuple!(int, long, float) TL;
foreach (i, T; TL)
writefln("TL[%d] = ", i, typeid(T));
}
----------------8<----------------8<----------------
I get:
_field_field_0
Internal error: e2ir.c 688
source (under the section 'Looping'):
http://dlang.org/tuple.html
The code in that section is also wrong and doesn't compile. The following
gives the correct output:
---------------->8---------------->8----------------
import std.typecons;
import std.typetuple;
import std.stdio;
void main() {
Tuple!(int, long, float) TL;
foreach (i, T; TL)
writefln("TL[%d] = %s", i, typeid(T));
alias TypeTuple!(3, 7L, 6.8) ET;
foreach (i, E; ET)
writefln("ET[%d] = %s", i, E);
----------------8<----------------8<----------------
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list