ClojureScript

apply does not work on IFn objects in CLJS

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
  • Patch:
    Code and Test

Description

http://dev.clojure.org/jira/browse/CLJS-135 fixed this for multimethods, but the same issue applies to anyone who implements IFn.

The attached patch fixes this by modifying extend-type to emit an apply method on the extended object's prototype.

Activity

Brandon Bloom made changes -
Field Original Value New Value
Patch Code and Test [ 10002 ]
Description http://dev.clojure.org/jira/browse/CLJS-135 fixed this for multimethods, but the same issue applies to anyone who implements IFn.

My initial guess is that extend-type should automatically define an apply method on the extended object's prototype.
http://dev.clojure.org/jira/browse/CLJS-135 fixed this for multimethods, but the same issue applies to anyone who implements IFn.

The attached patch fixes this by modifying extend-type to emit an apply method on the extended object's prototype.
Attachment apply1.patch [ 11119 ]
Labels patch,
David Nolen made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
David Nolen made changes -
Status Resolved [ 5 ] Closed [ 6 ]

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: