-profile
Anthony Goins
neontotem at gmail.com
Fri Jun 7 16:47:23 PDT 2013
On Friday, 7 June 2013 at 23:42:58 UTC, Anthony Goins wrote:
> 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?
oops forgot to say
balancedParens is called from the 'in' contract of globMatch.
Is this even worth a bug report?
More information about the Digitalmars-d-learn
mailing list