definterface makes an actual Java interface. Java does not allow "-".
Attempting this should probably fail with an error message. Stu > Hi, > > It seems definterface/deftype have a problem with "-" in the method name... > > ... Clojure 1.2.0-master-SNAPSHOT (today) > > (definterface INm (^String get-nm [])) > ==> user.INm > (deftype Nm[nm] INm (^String get-nm [this] (str "Mr " nm))) > ==> java.lang.IllegalArgumentException: Can't define method not in > interfaces: get_nm (NO_SOURCE_FILE:2) > > (definterface INm (^String getnm [])) > ==> user.INm > (deftype Nm[nm] INm (^String getnm [this] (str "Mr " nm))) > ==> user.Nm > (.getnm (Nm. "Smith")) > ==> "Mr Smith" > > Is that a bug or is there a usage rule I'm missing? > > Thanks, Adrian. > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to [email protected] > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
