https://issues.dlang.org/show_bug.cgi?id=23230

          Issue ID: 23230
           Summary: cannot implicitly convert expression `"define"` of
                    type `char[7]` to `char`
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

>From https://briancallahan.net/blog/20220704.html


#define NUMSCHKEYS      4
#define MAXLENSCHKEYS   17      /* 17 = longest keyword (16)  + 1 */

char scharkey[NUMSCHKEYS][MAXLENSCHKEYS] =
        { 
                "define",
                "list",
                "if",
                "lambda"
        };


generates the error for each string literal: cannot implicitly convert
expression `"define"` of type `char[7]` to `char` (or similar message).

--

Reply via email to