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

这个地方可能会抛 #4

Open
JamesKarl opened this issue Nov 1, 2019 · 0 comments
Open

这个地方可能会抛 #4

JamesKarl opened this issue Nov 1, 2019 · 0 comments

Comments

@JamesKarl
Copy link

如果$valueGetter != null 但是$valueGetter也不是一个List,$valueGetter as List会抛异常的。应该改为:$valueGetter is List

KotlineDataClass.kt 的第64行。

修改前
p.isListType() && !p.getGenericType().isPrimitiveType() -> { append("$valueGetter != null ? ($valueGetter as List).map((i) => ${p.getGenericType()}.fromJson(i)).toList() : null") }

修改后
p.isListType() && !p.getGenericType().isPrimitiveType() -> { append("$valueGetter is List ? ($valueGetter as List).map((i) => ${p.getGenericType()}.fromJson(i)).toList() : null") }

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