Re: Dupping in a nothrow function?

2011-03-07 Thread Steven Schveighoffer
On Fri, 04 Mar 2011 17:55:15 -0500, Simen kjaeraas wrote: bearophile wrote: Simen kjaeraas: It's probably correct that _adDupT is not nothrow. It is also wrong that it shouldn't be. I was about to write a bug report regarding allowing dupping in nothrow functions, because this is now

Re: Dupping in a nothrow function?

2011-03-04 Thread Simen kjaeraas
bearophile wrote: Simen kjaeraas: It's probably correct that _adDupT is not nothrow. It is also wrong that it shouldn't be. I was about to write a bug report regarding allowing dupping in nothrow functions, because this is now allowed, and I think this is the same thing as doing a dup:

Re: Dupping in a nothrow function?

2011-03-04 Thread bearophile
Simen kjaeraas: > It's probably correct that _adDupT is not nothrow. It is also wrong > that it shouldn't be. I was about to write a bug report regarding allowing dupping in nothrow functions, because this is now allowed, and I think this is the same thing as doing a dup: nothrow void foo(int

Re: Dupping in a nothrow function?

2011-03-04 Thread Simen kjaeraas
bearophile wrote: It's now OK to create a new array in a nothrow function, but it seems dup is not allowed: nothrow void foo(int[] a) { a.dup; } void main() {} Errors with dmd 2.052, is this correct? test.d(2): Error: _adDupT is not nothrow test.d(1): Error: function test.foo 'foo' is

Dupping in a nothrow function?

2011-03-04 Thread bearophile
It's now OK to create a new array in a nothrow function, but it seems dup is not allowed: nothrow void foo(int[] a) { a.dup; } void main() {} Errors with dmd 2.052, is this correct? test.d(2): Error: _adDupT is not nothrow test.d(1): Error: function test.foo 'foo' is nothrow yet may throw