-profile

Anthony Goins neontotem at gmail.com
Fri Jun 7 16:42:57 PDT 2013


On Friday, 7 June 2013 at 21:39:26 UTC, bearophile wrote:
> Anthony Goins:
>
>> Simple question is why?
>
> I am compiling this code with -profile, and I don't see errors:
>
>
> import std.string: balancedParens;
> void main() {
>     assert(balancedParens("[[]]", '[', ']'));
> }
>
>
> Bye,
> bearophile

okay found it

module profiletest;
import std.path;

void main()
{
     assert(globMatch("foo.bar", "*"));
}

dmd -profile profiletest.d
/usr/include/dmd/phobos/std/path.d(2187): Error: balancedParens 
is not nothrow
/usr/include/dmd/phobos/std/path.d(2188): Error: balancedParens 
is not nothrow


globMatch is @safe pure nothrow
balancedParens is not nothrow
-release ignores contracts, right?



More information about the Digitalmars-d-learn mailing list