Re: ModuleInfo.unitTest cannot be called twice

2012-12-13 Thread Jacob Carlborg
On 2012-12-13 08:58, Johannes Pfau wrote: I don't remember a reason why calling that function more than once shouldn't work. But: unitTest is a property returning a function so it might be related to the optional parentheses / broken properties stuff. Does "m.unitTest()()" compile? Yeah, that

Re: ModuleInfo.unitTest cannot be called twice

2012-12-13 Thread Johannes Pfau
Am Wed, 12 Dec 2012 22:00:55 +0100 schrieb Jacob Carlborg : > It seems it's not possible to call ModuleInfo.unitTest more than once. > > The following code will not run the unit tests: > > foreach (m ; ModuleInfo) > if (m && m.unitTest) > m.unitTest(); > > But this code will: > >

Re: ModuleInfo.unitTest cannot be called twice

2012-12-12 Thread Jacob Carlborg
On 2012-12-12 22:00, Jacob Carlborg wrote: It seems it's not possible to call ModuleInfo.unitTest more than once. The following code will not run the unit tests: foreach (m ; ModuleInfo) if (m && m.unitTest) m.unitTest(); But this code will: foreach (m ; ModuleInfo) if (m)

ModuleInfo.unitTest cannot be called twice

2012-12-12 Thread Jacob Carlborg
It seems it's not possible to call ModuleInfo.unitTest more than once. The following code will not run the unit tests: foreach (m ; ModuleInfo) if (m && m.unitTest) m.unitTest(); But this code will: foreach (m ; ModuleInfo) if (m) if (auto fp = m.unitTest) f