September 20, 2019 [Issue 20232] New: WhiteHole is unusable with @safe interface functions | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20232 Issue ID: 20232 Summary: WhiteHole is unusable with @safe interface functions Product: D Version: D2 Hardware: x86 OS: Mac OS X Status: NEW Severity: normal Priority: P1 Component: phobos Assignee: nobody@puremagic.com Reporter: andrej.mitrovich@gmail.com ``` import std.typecons; interface I { @safe: void foo (); } void main () { auto c = new WhiteHole!I; // error auto c = new BlackHole!I; // ok } ``` /Library/D/dmd/src/phobos/std/typecons.d-mixin-4530(4535): Error: `@safe` function `std.typecons.AutoImplement!(I, generateAssertTrap, isAbstractFunction).AutoImplement.foo` cannot call `@system` constructor `std.typecons.NotImplementedError.this` -- |
Copyright © 1999-2021 by the D Language Foundation