Skip to content

Dagger should fail when overriding hardcoded method names #2575

@vRallev

Description

@vRallev

Dagger generates a builder() method for components by default. This can lead to surprising results when the same method name in a component for a subcomponent builder is used:

@Component
interface ParentComponent {
  public fun builder(): MySubcomponent.Builder
}

In this case Dagger should throw an error and claim that method name.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions