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
Commit pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/396d9a7906b6349f5e1c5ce3818ec09e3a95ec0e Fix issue 9774 Error message with __error using == on tuple members