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.

0
6 comments

What suggestions do you expect for this statement? What language is that?

0

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); 

0

IntelliJ IDEA supports a lot of languages, not just Java.

0

So, isn't smart type or code assistance intended to help in this situation?

0

It's not easy to detect this kind of syntax error.

0

Please sign in to leave a comment.