any way to get intermediate types in a method chai...
# intellij
a
any way to get intermediate types in a method chain? (i.e., this)
s
Is it
View> Type Info
you’re after?
👍 1
a
oh yeah that works. thanks
👍 1
m
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
You can use IDE intention to specify the type of the lambda parameter (defaulting to
it
) explicitly.
m
I must be going blind, can't find Type Info here
a
@Matej Kormuth perhaps it is not on Windows/Linux (whatever you are using) on MacOS it is right below
Parameter Info
a
For me it’s “Expression Type”
a
that's interesting that there is that variation cross-platform imo
a
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
oh I didn't mean programming
this
I was just referring to the image
m
Parameter info is actually not that useful in some cases
a
@Matej Drobnič it appeared to be for me. Why don't you think so?
m
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
it does not do this for me
m
image.png
a
image.png
oh wait read you wrong
yeah
Parameter Info
is not very helpful
m
ah I see
you were using expression info
a
mhm
well
Type Info
m
Type Info
right
wait
Type Info now shows up for me in the menu 😄
I have no idea what is going on
a
hmm weird
did you update IntelliJ?
m
maybe my IntelliJ installation is broken somehow (I have checked in IntelliJ previously, now I'm testing in Android Studio)
a
btw you on Linux or Windows
out of curiousity
m
Windows
a
yeah weird