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

Implementation by delegation with constructor invocation bug #960

Closed
sikrinick opened this issue Nov 13, 2020 · 0 comments · Fixed by #961
Closed

Implementation by delegation with constructor invocation bug #960

sikrinick opened this issue Nov 13, 2020 · 0 comments · Fixed by #961

Comments

@sikrinick
Copy link

sikrinick commented Nov 13, 2020

The bug you're experiencing might have already be reported!
Please search in the issues before creating one.

Expected Behavior

Detekt/KtLint should pass. Passed on detekt 1.1.1.

class CopyToClipboardHandler(
    copyToClipboardPayloadParser: CopyToClipboardPayloadParser,
    copyToClipboardPayloadConsumer: CopyToClipboardPayloadConsumer
) : TopicConsumer by TopicHandler(
    topic = "copyToClipboard",
    payloadParser = copyToClipboardPayloadParser,
    payloadConsumer = copyToClipboardPayloadConsumer
)

Observed Behavior

Detekt and Ktlint fail, requires next:

class CopyToClipboardHandler(
    copyToClipboardPayloadParser: CopyToClipboardPayloadParser,
    copyToClipboardPayloadConsumer: CopyToClipboardPayloadConsumer
) : TopicConsumer by TopicHandler(
        topic = "copyToClipboard",
        payloadParser = copyToClipboardPayloadParser,
        payloadConsumer = copyToClipboardPayloadConsumer
)

Your Environment

  • Version of ktlint used: Detekt 1.14.* = ktlint 0.39.0
  • Version of Gradle used (if applicable): Gradle 6.1.1 + Android plugin 4.0.2
  • Operating System and version: MacOS 10.15.7
@sikrinick sikrinick changed the title Implementation by delegation wktn Implementation by delegation with constructor invocation bug Nov 13, 2020
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 a pull request may close this issue.

1 participant