On 4 May 2012 12:52, Jacob Carlborg <d...@me.com> wrote: > On 2012-05-04 10:38, Manu wrote: > >> This syntax complains, but it's precisely the same expression I use to > > pass an argument in to a function, and it's fine there: >> remedy\modules\hud.d(35):**Error: function remedy.hud.func without >> 'this' cannot be const/immutable >> >> const ref Thing function() blah = &func; >> > > Again this declares the variable const and not the return type. I'm not > sure about the "ref" thing. I don't know if function pointers can return by > reference, at least not the syntax. >
Ah, of course! I didn't spot that >_< Thanks. I suppose technically, 'ref' can lead to the same ambiguity. This must be the core of the problem. ref needs to be supported with parentheses?