Github user xiaokang commented on the pull request:
https://github.com/apache/storm/pull/312#issuecomment-63223579
@BuDongDong , your explanation sounds reasonable. But the following clojure
REPL shows that type check will raise error if the real argument does not match
type declaration.
user=> (defn tostring [^String obj] (.toString obj))
#'user/tostring
user=> (tostring "123")
"123"
user=> (tostring 123)
ClassCastException java.lang.Long cannot be cast to java.lang.String
user/tostring (NO_SOURCE_FILE:1)
user=> (tostring (Object.))
ClassCastException java.lang.Object cannot be cast to java.lang.String
user/tostring (NO_SOURCE_FILE:1)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---