[Issue 19875] New: [betterC] dmd 2.0.86 Allowed class compile

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 15 12:25:10 UTC 2019


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

          Issue ID: 19875
           Summary: [betterC] dmd 2.0.86 Allowed class compile
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Windows
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: joaopaulo1339 at outlook.com

Created attachment 1745
  --> https://issues.dlang.org/attachment.cgi?id=1745&action=edit
Compilation example

This code compiles just fine with dmd 2.0.86 and betterC enabeld


pragma(msg, __VERSION__);

import core.stdc.stdio : printf;

interface ITeste {
        void some();

}

class Teste : ITeste {
        void some() {
                version (D_BetterC) {
                        printf("test\n");
                }
        }
}

void main() {
        Teste t = new Teste();
        t.some();
}

--


More information about the Digitalmars-d-bugs mailing list