[Issue 12950] New: Lexer interprets UFCS on hex integer as hex float literal

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Jun 19 14:18:33 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12950

          Issue ID: 12950
           Summary: Lexer interprets UFCS on hex integer as hex float
                    literal
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: briancschott at gmail.com

Another chapter in the long and stupid history of UFCS and numeric literals:

---
import std.stdio;

void x(int f) {    writeln(f); }

void main(string[] args)
{
    123.x; // Compiles and runs
    0x123.x; // Does not compile
}
---

--


More information about the Digitalmars-d-bugs mailing list