Scheme: cannot currently use scheme functions as first class args in modules

Issue #130 resolved
Doug Blank created an issue
(using "Events")
(Events.init)
(define handler
    (func
        (lambda (o e)
            (printf "{0} {1}\n" o e))))
(handler 1 2)
(Events.subscribe "message" handler)

Results:

Traceback (most recent call last):
Microsoft.Scripting.ArgumentTypeException: expected Func[object, Event, object], got Closure

Comments (3)

  1. Doug Blank reporter

    Fixed: instead of func, use callback0, callback1, callback2 for callbacks expecting 0, 1, or two arguments.

  2. Log in to comment