view lphobos/internal/contract.d @ 512:0d286cd9fd08

Add interface comparison to EqualExp: just do pointer comparison. Fixes run/b/bug_e2ir_1786_B,C.
author Christian Kamm <kamm incasoftware de>
date Fri, 15 Aug 2008 22:41:47 +0200
parents 373489eeaf90
children
line wrap: on
line source

module internal.contract;

import std.string: toString;
extern(C):

void exit(int);

/*void _d_assert(bool cond, uint line, char[] msg)
{
    if (!cond) {
        printf("Aborted(%u): %.*s\n", line, msg.length, msg.ptr);
        exit(1);
    }
}*/
void _d_assert(string file, uint line) {
  throw new Exception(file~":"~.toString(line)~": Assertion failed!");
}

void _d_assert_msg(string msg, string file, uint line) {
  throw new Exception(file~": "~.toString(line)~": Assertion failed: \""~msg~"\"");
}