← Back to index
|
Original Bugzilla link
Bug 1167 – Assertion failure when compiling expression tuples
Status
RESOLVED
Resolution
DUPLICATE
Severity
critical
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2007-04-20T06:09:00Z
Last change time
2015-06-09T05:14:59Z
Assigned to
bugzilla
Creator
samukha
Comments
Comment #0
by samukha — 2007-04-20T06:09:52Z
dmd 1.013 (this version is not in bugzilla) asserts on this: template Tuple(A...) { alias A Tuple; } template Map(A...) { static if (A.length > 2) { alias Tuple!(A[0], Map!(A[2..$]).keys) keys; alias Tuple!(A[1], Map!(A[2..$]).values) values; } else { static assert(A.length == 2); alias Tuple!(A[0]) keys; alias Tuple!(A[1]) values; } } struct Foo(A...) { const typeof(A[0])[] keys = [Map!(A).keys]; const typeof(A[1])[] values = [Map!(A).values]; } void main() { Foo!(1, "One", 2, "Two") foo; } Assertion failure: '0' on line 4553 in file 'expression.c'
Comment #1
by onlystupidspamhere — 2007-04-20T06:23:10Z
*** This bug has been marked as a duplicate of 911 ***