www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 19315] New: #line inside token string affect outside code


          Issue ID: 19315
           Summary: #line inside token string affect outside code
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: doob me.com

The static assert in the following code unexpectadely passes:

enum code = q{
    #line 10
static assert(__LINE__ == 11);

"#line 10" when used inside a token string affects the code outside of the

Oct 19 2018