[Issue 8441] function expected, not <my function>

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Nov 20 07:31:14 PST 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8441


jfanatiker at gmx.at changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jfanatiker at gmx.at


--- Comment #1 from jfanatiker at gmx.at 2012-11-20 07:31:13 PST ---
Can also reproduced with: 
https://github.com/eskimor/phobos/blob/new_signal/std/signals.d

And is currently a blocker for a full signals2 implementation.

Without it, I can only provide the FullSignal struct, which is good but does
not support easily restriction of access to emit(). So users would have to
redundantly create boilerplate code. Another option would be to use string
mixins, but the syntax would not be as nice, so I would like to stick with the
current implementation.

To summarize the problem: A mixin seems not to work with methods that are
templates themselves, resulting in strange errors like: 

std/signals.d(730): Error: no overload matches for disconnect(string
method,ClassType)

or

std/signals.d(633): Error: function expected before (), not
'a.connect!("watch")'

Tested with dmd 2.060 and current master
(7c370f71641c4408ddc9ebd5709e6e182e34ad2b).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list