Bug 20232 – WhiteHole is unusable with @safe interface functions

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-09-20T01:19:56Z
Last change time
2020-01-28T00:05:27Z
Keywords
pull
Assigned to
No Owner
Creator
Andrej Mitrovic

Comments

Comment #0 by andrej.mitrovich — 2019-09-20T01:19:56Z
``` 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`
Comment #1 by dlang-bot — 2020-01-27T18:00:58Z
@MoonlightSentinel created dlang/phobos pull request #7375 "Fix Issue 20232 - WhiteHole is unusable with @safe interface functions" fixing this issue: - Fix Issue 20232 - WhiteHole is unusable with @safe interface functions https://github.com/dlang/phobos/pull/7375
Comment #2 by dlang-bot — 2020-01-27T19:18:21Z
@MoonlightSentinel created dlang/phobos pull request #7376 "Fix Issue 20540 - (White|Black)Hole does not work with return|scope functions" fixing this issue: - Fix Issue 20232 - WhiteHole is unusable with @safe interface functions https://github.com/dlang/phobos/pull/7376
Comment #3 by dlang-bot — 2020-01-28T00:05:27Z
dlang/phobos pull request #7376 "Fix Issue 20540 - (White|Black)Hole does not work with return|scope functions" was merged into master: - 869d9b561332ac0bf15a1c5db188d99aa8636ddb by MoonlightSentinel: Fix Issue 20232 - WhiteHole is unusable with @safe interface functions https://github.com/dlang/phobos/pull/7376