Re: how do I activate contracts for phobos functions in dmd
Just compile the needed module directly: dmd myapp.d src/std/bitmanip.d
Re: how do I activate contracts for phobos functions in dmd
On Friday, 2 November 2018 at 16:41:32 UTC, Stefan Koch wrote: Which phobos functions are used in dmd? there _should_ be none! I think I didn't phrase the title correctly: I'm using dmd as compiler and want to activate the contracts of phobos functions. For example there's a phobos function std.bitmanip.opIndex implemented like this: bool opIndex(size_t i) const @nogc pure nothrow in { assert(i < _len); } do { return cast(bool) bt(_ptr, i); } and when I call this function from my code I want the pre contract to be checked (assert(i < _len)
Re: how do I activate contracts for phobos functions in dmd
On Friday, 2 November 2018 at 14:10:35 UTC, Richard Palme wrote: My guess is that I have to build phobos with: $make -f posix.mak BUILD=debug but then what do I do next? I'm using Linux and I built dmd+phobos manually by following this guide: https://wiki.dlang.org/Building_under_Posix Which phobos functions are used in dmd? there _should_ be none!
how do I activate contracts for phobos functions in dmd
My guess is that I have to build phobos with: $make -f posix.mak BUILD=debug but then what do I do next? I'm using Linux and I built dmd+phobos manually by following this guide: https://wiki.dlang.org/Building_under_Posix