Open nhaarman opened 5 years ago
See https://github.com/nhaarman/Acorn-dev/pull/91#discussion_r236040859:
This could use a lint check: createViewController returns a ViewController instance, but a compile time check for V is not possible, see https://stackoverflow.com/questions/43790137/why-cant-type-parameter-in-kotlin-have-any-other-bounds-if-its-bounded-by-anot The lint check could check Scenes implementing ViewControllerFactory and check whether the return type of createViewController also adheres to the Scene's Container type.
This could use a lint check: createViewController returns a ViewController instance, but a compile time check for V is not possible, see https://stackoverflow.com/questions/43790137/why-cant-type-parameter-in-kotlin-have-any-other-bounds-if-its-bounded-by-anot
The lint check could check Scenes implementing ViewControllerFactory and check whether the return type of createViewController also adheres to the Scene's Container type.
Also, a Lint check checking whether ViewProvidingScene is only used with Scenes can be created (https://github.com/nhaarman/Acorn-dev/pull/91#discussion_r236069477).
ViewProvidingScene
See https://github.com/nhaarman/Acorn-dev/pull/91#discussion_r236040859:
Also, a Lint check checking whether
ViewProvidingScene
is only used with Scenes can be created (https://github.com/nhaarman/Acorn-dev/pull/91#discussion_r236069477).