Don't do Kotlin reflection on a non-Kotlin class.
Closes: https://github.com/square/moshi/issues/662
This commit is contained in:
parent
9f2ed487b2
commit
c04f1bafde
1 changed files with 2 additions and 1 deletions
|
@ -869,7 +869,8 @@ class GeneratedAdaptersTest {
|
|||
val encoded = MultiplePropertiesShareAdapter("Android", "Banana")
|
||||
assertThat(jsonAdapter.toJson(encoded)).isEqualTo("""{"a":"ANDROID","b":"BANANA"}""")
|
||||
|
||||
val delegateAdapters = jsonAdapter::class.memberProperties.filter {
|
||||
val delegateAdapters = GeneratedAdaptersTest_MultiplePropertiesShareAdapterJsonAdapter::class
|
||||
.memberProperties.filter {
|
||||
it.returnType.classifier == JsonAdapter::class
|
||||
}
|
||||
assertThat(delegateAdapters).hasSize(1)
|
||||
|
|
Loading…
Reference in a new issue