On 8/24/2018 4:22 PM, tide wrote:
struct SomeStruct
{
     void foo() {
         // use SomeStruct
     }
}


void broken()
{
     void function() foo = &SomeStruct.foo;
    foo(); // runtime error, isn't actually safe uses wrong calling convention as well
}

Not really lack of feature so much as there exists broken code. This has been valid code for god knows how long. At some point it was usable in @safe, but it looks you can't take an address of a member function without "this" as well in safe anymore.


That's because it isn't safe. But being able to take the address is important for system work.

Reply via email to