Fork me on GitHub
#core-typed
<
2018-12-21
>
drone05:12:02

I’m running into an issue where it appears core.typed isn’t getting return type information for a class static method

drone05:12:09

any idea if that’s a known issue?

drone05:12:19

this is with core.typed 0.6.0

drone05:12:19

also tried with 0.7.0

drone05:12:02

I was seeing TCerror as the type for something that was assigned a return value from a static method

drone05:12:42

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>)

ambrosebs13:12:30

@mrevelle c.c.t/non-nil-return might help

ambrosebs13:12:52

but things shouldn't return TCError, please report a reproducible ticket on jira or the mailing list. thanks!

ambrosebs13:12:03

@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.

drone15:12:26

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?

genekim16:12:42

Thank you @ambrosebs !! Keep up the great work!!!