[Issue 20137] New: A program crashes at runtime (should be compile error)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Aug 18 06:47:33 UTC 2019


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

          Issue ID: 20137
           Summary: A program crashes at runtime (should be compile error)
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: porton at narod.ru

The following program crashes at runtime. There should be instead a compile
error.

DMD64 D Compiler v2.087.1

///////////////////////
import std.typecons;

class SoundCard {
    void setDivider() { }
}

void main(string[] args) {
    SoundCard sc = scoped!SoundCard();
    sc.setDivider();
}

--


More information about the Digitalmars-d-bugs mailing list