Alex Osborne <[email protected]> writes:
> benjiiiiii <[email protected]> writes:
>
>> (ns org.codingkata.unit.MyKata
>> (:import (org.codingkata.unit.api.BaseKataSolution)
>> (org.codingkata.unit.api.BaseKataSolution$Day))
>> (:gen-class
>> :extends org.codingkata.unit.api.BaseKataSolution))
>>
>> This compile, but then i can't acces to Day neither BasKataSolution
>> $Day.
>
> Strange. After (:import org.codingkata.unit.api.BaseKataSolution$Day)
> you should be able to use BaseKataSolution$Day.
Ah. Actually I just noticed you've got an extra pair of parens around
your imports. Do it either this way:
(ns org.codingkata.unit.MyKata
(:import org.codingkata.unit.api.BaseKataSolution
org.codingkata.unit.api.BaseKataSolution$Day))
Or this way:
(ns org.codingkata.unit.MyKata
(:import (org.codingkata.unit.api BaseKataSolution
BaseKataSolution$Day)))
The extra parens mean a prefix, like in the second example.
(:import (foo bar baz)) means import both foo.bar and foo.baz
While (:import (foo)) is meaningless, it doesn't do anything.
--
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