mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 23:49:21 +08:00
Don't suffix the value param when overriding (#1503)
This commit is contained in:
@@ -132,8 +132,11 @@ public class AdapterGenerator(
|
|||||||
JsonWriter::class
|
JsonWriter::class
|
||||||
)
|
)
|
||||||
.build()
|
.build()
|
||||||
|
// Don't use NameAllocator here because it will add `_` to the name since it's a keyword, and that
|
||||||
|
// results in it warning about not matching the overridden function's params.
|
||||||
|
// https://github.com/square/moshi/issues/1502
|
||||||
private val valueParam = ParameterSpec.builder(
|
private val valueParam = ParameterSpec.builder(
|
||||||
nameAllocator.newName("value"),
|
"value",
|
||||||
originalTypeName.copy(nullable = true)
|
originalTypeName.copy(nullable = true)
|
||||||
)
|
)
|
||||||
.build()
|
.build()
|
||||||
|
Reference in New Issue
Block a user