D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6964 - Error message with __error: static assert(undefined+1)
Summary: Error message with __error: static assert(undefined+1)
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other All
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-17 02:10 UTC by Don
Modified: 2015-06-09 05:11 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Don 2011-11-17 02:10:52 UTC
Applies to most arithmetic operations.

static assert(-undefined);

bug.d(4): Error: undefined identifier undefined
bug.d(4): Error: static assert  (-(__error)) is false

It's because typeCombine overwrites its subexpressions with ErrorExp.