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

No args constructor can be improperly removed #2706

Closed
rsmith20 opened this issue Jun 18, 2024 · 1 comment
Closed

No args constructor can be improperly removed #2706

rsmith20 opened this issue Jun 18, 2024 · 1 comment

Comments

@rsmith20
Copy link
Contributor

Expected Behavior

The noargs constructor should not be removed:

class Foo() {
    constructor(x: Int) : this()
}

Observed Behavior

The constructor is removed:

class Foo {
    constructor(x: Int) : this()
}

Steps to Reproduce

Using class

class Foo() {
    constructor(x: Int) : this()
}

format with Intellij plugin 0.23.0 or command line ktlint 1.3.0.

Your Environment

  • Version of ktlint used: 1.3.0
  • Relevant parts of the .editorconfig settings: repro with no config
  • Operating System and version: M3 mac
@paul-dingemans
Copy link
Collaborator

Duplicate #2690. Tnx for reporting though.

@paul-dingemans paul-dingemans closed this as not planned Won't fix, can't repro, duplicate, stale Jun 19, 2024
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