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

Default argument equals removed when at line start #1039

Closed
rnett opened this issue Dec 28, 2020 · 0 comments · Fixed by #1041
Closed

Default argument equals removed when at line start #1039

rnett opened this issue Dec 28, 2020 · 0 comments · Fixed by #1041
Labels
Milestone

Comments

@rnett
Copy link

rnett commented Dec 28, 2020

When running with autoformat, the equals sign for a default argument is removed if it is at the line start (it's because of codegen).

Reproducer

With 0.40.0, Kotlin 1.4.21,

public fun decodeRaw2(littleEndian: Boolean?
= null): Int = 3

is turned into this:

public fun decodeRaw2(
    littleEndian: Boolean?
    null
): Int = 3

which doesn't compile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants