[Issue 20232] New: WhiteHole is unusable with @safe interface functions
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Fri Sep 20 01:19:56 UTC 2019
    
    
  
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 at puremagic.com
          Reporter: andrej.mitrovich at 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`
--
    
    
More information about the Digitalmars-d-bugs
mailing list