mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 16:09:21 +08:00
Add an abstract non-unit function regression for #974
Resolves #974 for good
This commit is contained in:
@@ -318,10 +318,17 @@ class DualKotlinTest(useReflection: Boolean) {
|
|||||||
|
|
||||||
abstract class InternalAbstractPropertyBase {
|
abstract class InternalAbstractPropertyBase {
|
||||||
internal abstract val test: String
|
internal abstract val test: String
|
||||||
|
|
||||||
|
// Regression for https://github.com/square/moshi/issues/974
|
||||||
|
abstract fun abstractFun(): String
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
class InternalAbstractProperty(override val test: String) : InternalAbstractPropertyBase()
|
class InternalAbstractProperty(override val test: String) : InternalAbstractPropertyBase() {
|
||||||
|
override fun abstractFun(): String {
|
||||||
|
return test
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Regression test for https://github.com/square/moshi/issues/975
|
// Regression test for https://github.com/square/moshi/issues/975
|
||||||
@Test fun multipleConstructors() {
|
@Test fun multipleConstructors() {
|
||||||
|
Reference in New Issue
Block a user