interface intf {
bool func();
}
abstract class abs: intf
{
void check( ) {
import std.stdio: writefln;
writefln("func: %s -- %s",
cast(void*) (&func).funcptr,
cast(void*) (&func).ptr);
func(); // craches at runtime
}
}
class ovd: abs { } // this should not compile
void main() {
ovd foo = new ovd();
foo.check();
}
$ dmd --version
DMD64 D Compiler v2.113.0-rc.1
Copyright (C) 1999-2026 by The D Language Foundation, All Rights Reserved written by Walter Bright
$ rdmd --force test.d
func: null -- 7ED881E8B010
Segmentation fault (core dumped)