← Back to index
|
Original Bugzilla link
Bug 2156 – [] and null should be accepted where a compile-time string is required
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2008-06-19T11:28:00Z
Last change time
2014-02-24T15:59:42Z
Keywords
patch, rejects-valid
Assigned to
nobody
Creator
samukha
Comments
Comment #0
by samukha — 2008-06-19T11:28:15Z
template Foo() { const char[] Foo = []; } static assert (Foo!() == ""); // ok pragma(msg, Foo!()); // fails (1) mixin("int i;" ~ Foo!()); // fails (2) void main() { } ---- Error messages without line or file: (1) pragma msg string expected for message, not '[]' (2) attribute argument to mixin must be a string, not ("int i;" ~ [])
Comment #1
by yebblies — 2011-06-30T00:34:35Z
*** Issue 2391 has been marked as a duplicate of this issue. ***
Comment #2
by yebblies — 2011-06-30T01:04:49Z
Fix for D2
https://github.com/D-Programming-Language/dmd/pull/180
Comment #3
by yebblies — 2011-08-10T09:28:19Z
*** Issue 6462 has been marked as a duplicate of this issue. ***
Comment #4
by bugzilla — 2011-09-02T14:01:04Z
https://github.com/D-Programming-Language/dmd/commit/842db08516f0606ea9b278d179f8f7c51776f805
https://github.com/D-Programming-Language/dmd/commit/ff1965347d6ff2b0c3ebb71ff7c06254aba38c66