digitalmars.D.bugs - [Issue 18829] New: pragma msg of int incoherent
- d-bugmail puremagic.com (26/26) May 05 2018 https://issues.dlang.org/show_bug.cgi?id=18829
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: nobody puremagic.com Reporter: oli_r fg4f.de 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. --
May 05 2018