https://kotlinlang.org logo
a

Andrew Gazelka

05/14/2019, 2:46 PM
any way to get intermediate types in a method chain? (i.e., this)
s

samneirinck

05/14/2019, 2:52 PM
Is it
View> Type Info
you’re after?
👍 1
a

Andrew Gazelka

05/14/2019, 2:53 PM
oh yeah that works. thanks
👍 1
m

Mike

05/14/2019, 3:25 PM
And at least while developing, I find it useful to put new-lines after
{
. If you have type hints turned on, IntelliJ will draw the types. Then quickly apply
join line
when I’m done. Only expand lines I want to know type for.
👍 1
l

louiscad

05/14/2019, 4:55 PM
You can use IDE intention to specify the type of the lambda parameter (defaulting to
it
) explicitly.
m

Matej Drobnič

05/14/2019, 8:58 PM
I must be going blind, can't find Type Info here
a

Andrew Gazelka

05/14/2019, 8:58 PM
@Matej Kormuth perhaps it is not on Windows/Linux (whatever you are using) on MacOS it is right below
Parameter Info
a

arekolek

05/15/2019, 6:20 AM
For me it’s “Expression Type”
a

Andrew Gazelka

05/15/2019, 6:21 AM
that's interesting that there is that variation cross-platform imo
a

arekolek

05/15/2019, 6:24 AM
Although I’m not sure if it’s the same thing because you mentioned “(i.e., this)” and Expression Type can’t be used for implicit
this
(but it can for explicit
this
)
a

Andrew Gazelka

05/15/2019, 6:25 AM
oh I didn't mean programming
this
I was just referring to the image
m

Matej Drobnič

05/15/2019, 7:15 AM
Parameter info is actually not that useful in some cases
a

Andrew Gazelka

05/15/2019, 7:16 AM
@Matej Drobnič it appeared to be for me. Why don't you think so?
m

Matej Drobnič

05/15/2019, 7:16 AM
For example on
emptyList<Int>().map { it * 20 }
code snippet
it just displays
transform (T) -> R
which is pretty much useless (I want to know WHAT exact type are T and R here)
a

Andrew Gazelka

05/15/2019, 7:17 AM
it does not do this for me
m

Matej Drobnič

05/15/2019, 7:17 AM
image.png
a

Andrew Gazelka

05/15/2019, 7:17 AM
image.png
oh wait read you wrong
yeah
Parameter Info
is not very helpful
m

Matej Drobnič

05/15/2019, 7:19 AM
ah I see
you were using expression info
a

Andrew Gazelka

05/15/2019, 7:19 AM
mhm
well
Type Info
m

Matej Drobnič

05/15/2019, 7:19 AM
Type Info
right
wait
Type Info now shows up for me in the menu 😄
I have no idea what is going on
a

Andrew Gazelka

05/15/2019, 7:20 AM
hmm weird
did you update IntelliJ?
m

Matej Drobnič

05/15/2019, 7:20 AM
maybe my IntelliJ installation is broken somehow (I have checked in IntelliJ previously, now I'm testing in Android Studio)
a

Andrew Gazelka

05/15/2019, 7:21 AM
btw you on Linux or Windows
out of curiousity
m

Matej Drobnič

05/15/2019, 7:21 AM
Windows
a

Andrew Gazelka

05/15/2019, 7:21 AM
yeah weird