Bug 9774 – Error message with __error using == on tuple members
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-03-21T01:33:00Z
Last change time
2015-06-09T05:12:02Z
Assigned to
nobody
Creator
clugdbug
Comments
Comment #0 by clugdbug — 2013-03-21T01:33:48Z
template T9774(ab...)
{
static assert( ab[0] == ab[0]);
}
static assert( T9774!(T9774));
=======================
bug.d(3): Error: void has no value
bug.d(3): Error: void has no value
bug.d(3): Error: static assert ((__error) == (__error)) is not evaluatable at compile time
bug.d(6): Error: template instance bug.T9774!(T9774) error instantiating
=======================
The problem is that typeCombine(a, b)
with a, b tuple members,
sets a and b to ErrorExp() but does NOT return ErrorExp, so then EqualExp tries to constant fold it.
Comment #1 by github-bugzilla — 2013-03-21T07:11:15Z