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

CREATOR of an improper type is not reported as an error #201

Open
sevar83 opened this issue Sep 28, 2017 · 0 comments
Open

CREATOR of an improper type is not reported as an error #201

sevar83 opened this issue Sep 28, 2017 · 0 comments

Comments

@sevar83
Copy link

sevar83 commented Sep 28, 2017

Hi, I've just found my own bug in this code causing an IllegalArgumentException:

@PaperParcel
data class MultiSearchState(
        val searchQuery: String? = null,
        val activeSearchType: SearchType = SearchType.MOVIES
) : ViewState, PaperParcelable {

    companion object {
        @JvmField val CREATOR = PaperParcelSearchState_SearchStarted.CREATOR
    }
}

The problem was the CREATOR val referring to another's class (SearchState.SearchStarted not MultiSearchState) creator. That's totally my mistake but it might be a good idea to show some error or warning. It's probably an often mistake after copy/paste. Anyway, thanks for the great library! It's the best.

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