mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00

Fixes: https://github.com/dlang/dmd/issues/20334 After preprocessing, #defines in C code that are just string literals are converted into D enums. As these are collected for use in D code, they should behave like D string literals and not C string literals.
14 lines
274 B
D
14 lines
274 B
D
// https://github.com/dlang/dmd/issues/20334
|
|
// EXTRA_FILES: imports/imp20344.c
|
|
import imports.imp20344;
|
|
string s = X;
|
|
const(char)* p = X;
|
|
|
|
void takes_string(string){ }
|
|
void takes_char_star(const(char)*){ }
|
|
|
|
|
|
void test20344(){
|
|
takes_string(X);
|
|
takes_char_star(X);
|
|
}
|