D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3945 - AssertExpression message should implicitly convert to const char[]
Summary: AssertExpression message should implicitly convert to const char[]
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dlang.org (show other issues)
Version: D2
Hardware: All All
: P2 normal
Assignee: No Owner
URL: http://digitalmars.com/d/2.0/expressi...
Keywords: spec
Depends on:
Blocks:
 
Reported: 2010-03-12 22:27 UTC by Jerry Quinn
Modified: 2014-02-15 02:44 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Jerry Quinn 2010-03-12 22:27:13 UTC
AssertExpression states that a message if given must be convertible to char[].  That would prevent the use of a string constant in AssertExpression, since it is (immutable)char[] and not implicitly convertible to char[].

Here's the existing text:

The second Expression, if present, must be implicitly convertible to type char[]. It is evaluated if the result is false, and the string result is appended to the AssertError's message.
Comment 1 Walter Bright 2010-05-05 11:02:00 UTC
changeset 1498
Comment 2 Don 2010-05-18 12:17:06 UTC
FixedDMD2.046.