https://issues.dlang.org/show_bug.cgi?id=14035
Issue ID: 14035
Summary: string concatenation accepts ints in templates
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
the following code happily compiles:
template alice (usize ln=__LINE__) {
enum alice = "{ int t_"~ln~" = 42; }";
}
pragma(msg, alice!());
it uses `ln` value as character code, which seems to be wrong, as trying to do
the same in ordinary function fails with the following message:
Error: incompatible types for (("{ int t_") ~ (ln)): 'string' and 'uint'
--