Issue
How to see the type of variable in Android Studio when using Kotlin without type annotations.
Currently I'm trying to see it by giving the variable a type I know is incorrect and the IDE informs me with an error about the type it expected.
val variable = dont().know().type().ofThis()
To give example, I can press CTRL+P to see the signature of a function, is there a similar way to see the inferred type of a variable?
Solution
You can enable Parameter name hints for that
To do so, go to File -> Settings -> Editor -> General -> Appearance and check the Show parameter name hints. Be sure to click configure button and at the Options panel, check the required options, including show local variable type hints:
Answered By - Mousa



0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.