ClojureScript

extend-type with ungrouped multi-arity function needs an error message

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Duplicate
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    0.0-1913

Description

The following incorrect code:

(deftype Foo [])
(extend-type Foo
IFn
(-invoke [this a] a))

produces a pretty incomprehensible error message. It is an extremely easy mistake to make as a beginner : the fact that extend-type has a different syntax for multiple-arity functions is not obvious at all. Would be helpful to have a real error message here.

Activity

Hide
David Nolen added a comment -
Show
David Nolen added a comment - CLJS-433

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: