https://issues.dlang.org/show_bug.cgi?id=17333
Issue ID: 17333
Summary: Disallow CT concat of string with integer
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: minor
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
int n = 2;
//enum int n = 2;
string s = "" ~ n;
The above with dmd v2.074.0 produces:
ctforeachn.d(18): Error: incompatible types for (("") ~ (n)): 'string' and
'int'
However, using enum for n instead, the code compiles. It should produce the
same error.
--