https://kotlinlang.org logo
Title
s

Slackbot

09/14/2018, 8:59 AM
This message was deleted.
l

lex

09/14/2018, 9:00 AM
what kind of errors are reported?
p

pniederw

09/14/2018, 9:01 AM
see above (I edited the message)
l

lex

09/14/2018, 9:02 AM
can you provide a sample code?
o

orangy

09/14/2018, 9:05 AM
Yes, please, some more context will be really helpful.
p

pniederw

09/14/2018, 9:08 AM
Ah, the Java method I’m calling changed its signature from
void foo()
to
<T> T foo()
. So it’s not an issue specified to 1.2.70 but an instance of the general issue that unlike Java, Kotlin can’t infer
<T> T foo()
. I’ve been running into this quite a lot as this is a common pattern in Java APIs.
<T> T
is often used to make Java DSLs work and doesn’t return a meaningful result (it’s always
null
). But to call it from Kotlin I need to write non-sensical code such as
foo<AnyClassICanThinkOf>()
.
s

stanislav.erokhin

09/14/2018, 9:12 AM
p

pniederw

09/14/2018, 9:13 AM
indeed, thanks
k

karelpeeters

09/14/2018, 9:44 AM
Why did you delete the message?
p

pniederw

09/14/2018, 9:51 AM
because it’s not a problem with 1.2.70 as I initially claimed, but a long-standing well-known problem.
k

karelpeeters

09/14/2018, 10:23 AM
Yeah but it's annoying, now we only get to see half the discussion that happened here.