Mercurial > projects > dstress
view run/new_04.d @ 570:32f7f8ce5e51
updated "===" -> "is" and "!==" to "!(...===...)"
author | thomask |
---|---|
date | Wed, 08 Jun 2005 17:49:15 +0000 |
parents | 73ac7d1627e0 |
children | b3da1b510a19 |
line wrap: on
line source
// $HeadURL$ // $Date$ // $Author$ module dstress.run.new_04; extern(C) void* malloc(size_t); byte a; class MyClass{ byte b; this(byte c){ b=c; } new(size_t size, byte blah){ void* v=malloc(size); if(v is null){ throw new Exception(null); } a=blah; return v; } } int main(){ MyClass m = new(21) MyClass(12); assert(m.b==12); assert(a==21); return 0; }