Bug 22888 – ImportC: Error: cannot cast `"123"` to `const(char)` at compile time

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2022-03-17T10:52:31Z
Last change time
2022-09-22T02:46:57Z
Keywords
ImportC
Assigned to
No Owner
Creator
Andrea Fontana

Comments

Comment #0 by trikkuz — 2022-03-17T10:52:31Z
This code is rejected: ``` const char str[][4] = {"123"}; ```
Comment #1 by bugzilla — 2022-09-22T02:46:57Z
It works with the current master. (There have been several fixes for the initializers.)