Created
July 21, 2018 20:32
-
-
Save guliash/ee463e4b7dfbef1be40852c86d9fe409 to your computer and use it in GitHub Desktop.
Pytting Scoped class to wrong component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.guliash.dagger; | |
import dagger.Component; | |
import dagger.Subcomponent; | |
import javax.inject.Inject; | |
import javax.inject.Scope; | |
import javax.inject.Singleton; | |
public class Main { | |
public static void main(String[] args) {} | |
} | |
@Singleton | |
@Component | |
interface ComponentA { | |
ComponentB componentB(); | |
MyClass myClass(); | |
} | |
@Scope | |
@interface MyScope {} | |
@MyScope | |
@Subcomponent | |
interface ComponentB {} | |
@MyScope | |
class MyClass { | |
@Inject | |
MyClass() {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment