Bug 2143 – Mixed-in identifier is not recognized by static if

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Windows
Creation time
2008-06-06T10:55:00Z
Last change time
2014-02-24T15:32:00Z
Assigned to
bugzilla
Creator
samukha

Comments

Comment #0 by samukha — 2008-06-06T10:55:05Z
May be related to 1113 and others ---- template Tuple(A...) { alias A Tuple; } template Foo() { mixin ("alias Tuple!(1) tuple;"); static if (tuple[0] == 1) { } } alias Foo!() foo; ---- test.d(13): Error: undefined identifier tuple Add an intermediate alias to work around it: ---- template Foo() { mixin ("alias Tuple!(1) tuple;"); alias tuple betterTuple; static if (betterTuple[0] == 1) { } } ----
Comment #1 by bugzilla — 2008-06-22T18:58:59Z
Fixed dmd 1.031 and 2.015