super(...) in mixin template

2014-03-03 Thread Steve Teale
I did not get any takers in D Learn, so I'll try again here. Mixin templates are supposed to be instantiated in the scope where they were invoked. I have tried one that I want to invoke in the body of a constructor, but it fails when it calls super(...). Should this be so, or is it a bug? S

Re: super(...) in mixin template

2014-03-03 Thread Meta
On Monday, 3 March 2014 at 16:11:48 UTC, Steve Teale wrote: I did not get any takers in D Learn, so I'll try again here. Mixin templates are supposed to be instantiated in the scope where they were invoked. I have tried one that I want to invoke in the body of a constructor, but it fails when

Re: super(...) in mixin template

2014-03-03 Thread Gary Willoughby
On Monday, 3 March 2014 at 16:11:48 UTC, Steve Teale wrote: I did not get any takers in D Learn, so I'll try again here. Mixin templates are supposed to be instantiated in the scope where they were invoked. I have tried one that I want to invoke in the body of a constructor, but it fails when

Re: super(...) in mixin template

2014-03-03 Thread Steve Teale
On Monday, 3 March 2014 at 16:20:22 UTC, Gary Willoughby wrote: On Monday, 3 March 2014 at 16:11:48 UTC, Steve Teale wrote: I did not get any takers in D Learn, so I'll try again here. Mixin templates are supposed to be instantiated in the scope where they were invoked. I have tried one that I

Re: super(...) in mixin template

2014-03-03 Thread Jacob Carlborg
On Tuesday, 4 March 2014 at 05:08:45 UTC, Steve Teale wrote: There's an example below, but it is probably not necessary. The thing is that the mixin won't compile because it's seeing super(whatever) as an attempt to define a function. Perhaps you already figured this out but template mixins

Re: super(...) in mixin template

2014-03-04 Thread Steve Teale
On Tuesday, 4 March 2014 at 07:23:29 UTC, Jacob Carlborg wrote: Perhaps you already figured this out but template mixins can only mixin declarations, not expression or statements. -- /Jacob Carlborg Damn! Yup, first sentence of the documentation. Wishful reading. Thanks. Steve

Re: super(...) in mixin template

2014-03-04 Thread John Colvin
On Tuesday, 4 March 2014 at 10:37:02 UTC, Steve Teale wrote: On Tuesday, 4 March 2014 at 07:23:29 UTC, Jacob Carlborg wrote: Perhaps you already figured this out but template mixins can only mixin declarations, not expression or statements. -- /Jacob Carlborg Damn! Yup, first sentence of t

Re: super(...) in mixin template

2014-03-04 Thread John Colvin
On Tuesday, 4 March 2014 at 12:01:46 UTC, John Colvin wrote: On Tuesday, 4 March 2014 at 10:37:02 UTC, Steve Teale wrote: On Tuesday, 4 March 2014 at 07:23:29 UTC, Jacob Carlborg wrote: Perhaps you already figured this out but template mixins can only mixin declarations, not expression or sta

Re: super(...) in mixin template

2014-03-04 Thread luminousone
On Tuesday, 4 March 2014 at 12:04:12 UTC, John Colvin wrote: On Tuesday, 4 March 2014 at 12:01:46 UTC, John Colvin wrote: On Tuesday, 4 March 2014 at 10:37:02 UTC, Steve Teale wrote: On Tuesday, 4 March 2014 at 07:23:29 UTC, Jacob Carlborg wrote: Perhaps you already figured this out but templ

Re: super(...) in mixin template

2014-03-05 Thread John Colvin
On Wednesday, 5 March 2014 at 04:05:56 UTC, luminousone wrote: On Tuesday, 4 March 2014 at 12:04:12 UTC, John Colvin wrote: On Tuesday, 4 March 2014 at 12:01:46 UTC, John Colvin wrote: On Tuesday, 4 March 2014 at 10:37:02 UTC, Steve Teale wrote: On Tuesday, 4 March 2014 at 07:23:29 UTC, Jacob C