Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.47 checks missing parens for if expression, while 0.46 doesn't (regression?) #1604

Closed
sanyarnd opened this issue Aug 23, 2022 · 1 comment
Milestone

Comments

@sanyarnd
Copy link

Maybe it's a false report, but I couldn't find anything related in a changelog.

The following code

fun gcd(a: Int, b: Int): Int {
    return if (b == 0) a
    else gcd(b, a % b)
}

now throws

GcdLcm.kt:4:24: Missing { ... }

The code above passes in 0.46.1

.editorconfig:

[{*.kt, *.kts}]
ij_kotlin_code_style_defaults = KOTLIN_OFFICIAL

ij_kotlin_imports_layout = *
ij_kotlin_packages_to_use_import_on_demand = ""
ij_kotlin_name_count_to_use_star_import = 999
ij_kotlin_name_count_to_use_star_import_for_members = 999

ij_kotlin_keep_blank_lines_before_right_brace = 1
ij_kotlin_keep_blank_lines_in_code = 1
ij_kotlin_keep_blank_lines_in_declarations = 1

ij_kotlin_assignment_wrap = normal
ij_kotlin_method_call_chain_wrap = normal
ij_kotlin_extends_list_wrap = normal

ij_kotlin_method_parameters_wrap = on_every_item
ij_kotlin_method_parameters_new_line_after_left_paren = true
ij_kotlin_method_parameters_right_paren_on_new_line = true

ij_kotlin_allow_trailing_comma = false
ij_kotlin_allow_trailing_comma_on_call_site = false

ij_kotlin_align_multiline_parameters = false
ij_kotlin_line_comment_at_first_column = false
ij_kotlin_line_break_after_multiline_when_entry = false
@paul-dingemans
Copy link
Collaborator

This is an intended side effect of PR #1565 (36a9f44#diff-23102555750e484a7df496237f01c33f59ceca2b0ab415b05de3b05c79c4cd2eL483). It could have been documented more clearly in the changelog.

@paul-dingemans paul-dingemans closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2022
@paul-dingemans paul-dingemans added this to the 0.47.1 milestone Aug 23, 2022
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

No branches or pull requests

2 participants