question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support same name val on @MergeComponent as on @ContributesTo component

See original GitHub issue
@AppScope
@MergeComponent(AppScope::class)
interface AppComponent {
    @Component.Factory
    interface Factory {
        fun create(@BindsInstance context: Context): AppComponent
    }
}

@ContributesTo(AppScope::class)
interface PartialAppComponent1 {
    val somethingDifferent: SomethingDifferent
}

@ContributesTo(AppScope::class)
interface PartialAppComponent2 {
    val somethingDifferent: SomethingDifferent
}

This compiles fine.

However

@AppScope
@MergeComponent(AppScope::class)
interface AppComponent {
    val somethingDifferent: SomethingDifferent <----------
}

@ContributesTo(AppScope::class)
interface PartialAppComponent {
    val somethingDifferent: SomethingDifferent
}

This does not. 'somethingDifferent' hides member of supertype 'PartialAppComponent' and needs 'override' modifier

Granted its all interface it should work, no?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:17

github_iconTop GitHub Comments

1reaction
vRallevcommented, May 8, 2021

Yes, I believe so.

0reactions
ursusursuscommented, May 8, 2021

Alright but aren’t they all functionally equivalent btw? (@dagger.subcomponent.Factory, @dagger.subcomponent.Builder, factory method) and thefore just a matter of taste?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Guide to components in Figma
Overview. Components are elements you can reuse across your designs. They help to create and manage consistent designs across projects.
Read more >
[styles] How to merge multiple styles? · Issue #11517 - GitHub
withStyles helps us process theming and merging our customizations ... Here's a recently merged example (same component, different styles):
Read more >
NG0300: Multiple components match with the same tagname
If you're having trouble finding multiple components with this selector tag name, check for components from imported component libraries, such as Angular ...
Read more >
Merging Records | Apex Developer Guide
You can merge up to three records of the same sObject type. ... Name FROM Account WHERE Name = 'Acme' LIMIT 1]; //...
Read more >
How to add multiple classes to a ReactJS Component?
I use ES6 template literals. For example: const error = this.state.valid ? '' : 'error' const classes = `form-control round-lg ${error}`.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found