https://issues.dlang.org/show_bug.cgi?id=18829
Issue ID: 18829
Summary: pragma msg of int incoherent
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
When working with pragma(msg,...) in relation to
https://issues.dlang.org/show_bug.cgi?id=7947 I stumbled upon the following
behaviour:
pragma(msg, typeof(int.init)); // Works: int
pragma(msg, int); // Fails:
// Error: found `)` when expecting `.` following int
// Error: found `;` when expecting identifier following `int`.
// ...
// but, obviously:
static assert(is(typeof(int.init) == int));
This seems to be related to `int` being a keyword, as everything works when
using an arbitrary struct.
--