www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12950] New: Lexer interprets UFCS on hex integer as hex float

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 puremagic.com
          Reporter: briancschott 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
}
---

--
Jun 19 2014