https://kotlinlang.org logo
Title
k

kiku

05/23/2017, 1:35 PM
is there a tool that can print out the inferred types for variables?
c

cy

05/23/2017, 2:13 PM
kiku: select an expression to infer type of and press Ctrl-Shift-P
with latest IDEA there is an option "Show local variables type hint"
k

kiku

05/23/2017, 2:15 PM
hey.. that's pretty cool!
unfortunately does not work with vim selection mode
also, which version is that option available in? can't see it my intellij
I'm running IntelliJ IDEA 2017.1.3 EAP
c

cy

05/23/2017, 2:23 PM
it probably requires 2017.2, not sure in which version it was introduced
Ctrl-Shift-P is bound to action "Expression Type", you could try to find it via Ctrl-Shift-A (actions search)
the action doesn't require selection but only caret set
in this case a popup should appear
k

kiku

05/23/2017, 4:22 PM
yeah this action works.. what I meant was only when i select it using a mouse, not while using the selection mode in ideavim
as for not seeing the option, it was "Show local variables type hint".. I guess it's there in 2017.2