mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 16:09:21 +08:00
Use raw type for kclass references in dynamic invocation code gen (#911)
* Use raw type for kclass references in dynamic invocation code gen Added a compile-only regression test Resolves #905 * Make it actually generic * Mostly fix generation Will need to wait for inlined instantiation to merge * Fix rebase issues and use newInstance
This commit is contained in:
@@ -47,6 +47,14 @@ data class TestClass(
|
||||
val dynamicInlineOptional: Int = createInlineInt()
|
||||
)
|
||||
|
||||
// Regression test for https://github.com/square/moshi/issues/905
|
||||
// Just needs to compile
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class GenericTestClassWithDefaults<T>(
|
||||
val input: String = "",
|
||||
val genericInput: T
|
||||
)
|
||||
|
||||
private fun createInt(): Int {
|
||||
return 3
|
||||
}
|
||||
|
Reference in New Issue
Block a user