This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-21
Channels
- # adventofcode (24)
- # announcements (1)
- # beginners (122)
- # braveandtrue (9)
- # calva (45)
- # cider (24)
- # cljdoc (8)
- # cljs-dev (23)
- # clojure (112)
- # clojure-europe (2)
- # clojure-india (2)
- # clojure-italy (36)
- # clojure-nl (3)
- # clojure-spec (32)
- # clojure-uk (35)
- # clojurescript (52)
- # core-typed (12)
- # cursive (4)
- # datomic (61)
- # emacs (4)
- # figwheel-main (2)
- # fulcro (14)
- # hoplon (5)
- # hyperfiddle (1)
- # jobs-discuss (6)
- # kaocha (5)
- # leiningen (2)
- # nrepl (15)
- # off-topic (62)
- # re-frame (26)
- # reagent (39)
- # ring (3)
- # shadow-cljs (56)
- # spacemacs (8)
- # specter (5)
- # tools-deps (1)
- # yada (2)
I’m running into an issue where it appears core.typed isn’t getting return type information for a class static method
I was seeing TCerror
as the type for something that was assigned a return value from a static method
I’m also seeing that core.typed assigns a (U nil ReturnType)
to everything coming from other Java static methods. there must be a better way to “fix” that besides from (cast ReturnType <form>)
but things shouldn't return TCError, please report a reproducible ticket on jira or the mailing list. thanks!
@genekim I just realized I missed a message from you a few months ago (about https://github.com/realgenekim/core.typed.ex1). Sorry about that. I only have a small amount of attention to offer right now-- it looks like you're trying to type check the specs, which isn't supported. You can only type check type annotations, with lein infer-type
IIRC.
@ambrosebs thanks!
similar question, how does one annotate to avoid the union with nil if I have a static field from a Java class that I want to be treated as non-nil?
Thank you @ambrosebs !! Keep up the great work!!!