www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22940] New: defect: Error: no property `_0L` for type `int`


          Issue ID: 22940
           Summary: defect: Error: no property `_0L` for type `int`
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: kdevel vogtner.de

https://dlang.org/spec/lex.html#floatliteral says:

   Floating literals can have embedded ‘_’ characters to improve
   and which are ignored.

This code (zzz2.d)

   void main ()
      real r = 1._0L;

when compiled with dmd 2.099 gives:

   $dmd zzz2
   zzz2.d(3): Error: no property `_0L` for type `int`

expected: Software should behave as the manual says or the other way round.

Mar 26 2022