D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 22888 - ImportC: Error: cannot cast `"123"` to `const(char)` at compile time
Summary: ImportC: Error: cannot cast `"123"` to `const(char)` at compile time
Status: RESOLVED WORKSFORME
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: ImportC
Depends on:
Blocks:
 
Reported: 2022-03-17 10:52 UTC by Andrea Fontana
Modified: 2022-09-22 02:46 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 Andrea Fontana 2022-03-17 10:52:31 UTC
This code is rejected:

```
const char str[][4] = {"123"};
```
Comment 1 Walter Bright 2022-09-22 02:46:57 UTC
It works with the current master. (There have been several fixes for the initializers.)