Smart Type did not offer an alternative?
Answered
An alternative to rectify the statement int tempFar = 32 + int((180.0/100.0) * temp); was not offered by Smart Type. Pressing Ctrl+Shift+ Space did offer an alternative.
Please sign in to leave a comment.
What suggestions do you expect for this statement? What language is that?
The language is Java. What language do you expect to be coding using IntelliJ? I expected IntelliJ to assist to determine the correct syntax. IntelliJ did not display a message that "int" should be surrounded by parentheses.So the correct statement is tempFar = 32 + (int)((180.0/100.0) * temp);
IntelliJ IDEA supports a lot of languages, not just Java.
So, isn't smart type or code assistance intended to help in this situation?
It's not easy to detect this kind of syntax error.
Thank you