Re: Lazy param with nothrow

2016-03-02 Thread Andrea Fontana via Digitalmars-d-learn
On Tuesday, 1 March 2016 at 13:41:38 UTC, Nemo wrote: On Tuesday, 1 March 2016 at 13:35:08 UTC, Andrea Fontana wrote: This very very simple function [1] won't compile. It says that param t is not nothrow. Why? What's wrong with this? http://dpaste.dzfl.pl/bfc382e62711 writeln isn't nothrow

Re: Lazy param with nothrow

2016-03-01 Thread ag0aep6g via Digitalmars-d-learn
On 01.03.2016 14:35, Andrea Fontana wrote: This very very simple function [1] won't compile. It says that param t is not nothrow. Why? What's wrong with this? http://dpaste.dzfl.pl/bfc382e62711 It's a bug. Lazy parameters generate delegates. nothrow is currently not inferred for those

Re: Lazy param with nothrow

2016-03-01 Thread Nemo via Digitalmars-d-learn
On Tuesday, 1 March 2016 at 13:35:08 UTC, Andrea Fontana wrote: This very very simple function [1] won't compile. It says that param t is not nothrow. Why? What's wrong with this? http://dpaste.dzfl.pl/bfc382e62711 writeln isn't nothrow so you can't call it from test which is nothrow

Lazy param with nothrow

2016-03-01 Thread Andrea Fontana via Digitalmars-d-learn
This very very simple function [1] won't compile. It says that param t is not nothrow. Why? What's wrong with this? http://dpaste.dzfl.pl/bfc382e62711