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

Allow subjects to be delegated locally #172

Closed
raniejade opened this issue Jan 28, 2017 · 0 comments
Closed

Allow subjects to be delegated locally #172

raniejade opened this issue Jan 28, 2017 · 0 comments
Milestone

Comments

@raniejade
Copy link
Member

raniejade commented Jan 28, 2017

In Kotlin 1.1 subjects can't be delegated locally, there is a compile error.

object MySpec: SubjectSpek<Foo>({
    val subject by subject { ... }
})

The issue is caused by how LifecycleAware is implemented (this also means that using memoized causes the same issue).

interface LifecycleAware<T>: ReadOnlyProperty<LifecycleAware<T>, T>

It should be declared as

interface LifecycleAware<T>: ReadOnlyProperty<Any, T>
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

No branches or pull requests

1 participant