Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
Qt Creator 3.6.0
-
None
-
Debian/Linux
Description
The following code causes problems
int test() { int arr[10]; bool x = false; return x > 0 ? arr[0] : 0; // <-- All indents following this line are 1 to the right } // <-- wrong indent
A workaround is to use parethesis for the return statement,
return (x > 0 ? arr[0] : 0);
This only appears to happen with the 2nd (true) statement. Having an array operator in the 3rd (false) position does not result in invalid indentation.
Attachments
Issue Links
- duplicates
-
QTCREATORBUG-11183 Correct indentation doesn't work with brace initialization and the conditional assignment operator
-
- Closed
-