Skip to content

Conversation

@RblSb
Copy link
Member

@RblSb RblSb commented Jun 1, 2025

There is also some idea to skip warning when you wrap condition in additional parentheses in first commit.
Related to #8634

var foo = false;
var foo2 = false;
// warning for these cases
var value = (foo = foo2) ? true : false;
if (foo = true) {}
if (foo = null) {}
if ({123; foo = true;}) {}

while (foo = true) {}
do {} while (foo = true);

var dyn:Dynamic = false;
if (dyn = null) {}
if (dyn = false) {}

if ((foo = null) && (foo = true)) {}
if ((foo = null) && ((foo = true) && (foo = true))) {}

// no warning
if ({foo = true; true;}) {}

@kLabz
Copy link
Contributor

kLabz commented Jun 1, 2025

That double parenthesis syntax seems out of place :/

@skial skial mentioned this pull request Jun 2, 2025
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants