phobos/std/hiddenfunc.d
Brad Roberts a9bc53273c merge r387:397 from candidate to trunk
-- new module std.contracts
  -- migrate callers to it where appropriate
2007-10-14 23:04:19 +00:00

33 lines
610 B
D

// Written in the D programming language
module std.hiddenfunc;
import std.stdio;
class HiddenFuncError : Error
{
private:
this(ClassInfo ci)
{
super("hidden method called for " ~ ci.name);
}
}
/********************************************
* Called by the compiler generated module assert function.
* Builds an Assert exception and throws it.
*/
extern (C) static void _d_hidden_func()
{ Object o;
asm
{
mov o, EAX;
}
//printf("_d_hidden_func()\n");
HiddenFuncError a = new HiddenFuncError(o.classinfo);
//printf("assertion %p created\n", a);
throw a;
}