We're updating the issue view to help you get more done. 

Delegate Property doesn't serialise - type mismatch error

Description

Something like this unit test (added to code) fails where it thinks C isn't a subtype of the interface extends. This will be some Java generics issue

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 interface DataClassByInterface<V> { val v : V } @Test fun dataClassBy() { data class C (val s: String) : DataClassByInterface<String> { override val v: String = "-- $s" } data class Inner<T>(val wrapped: DataClassByInterface<T>) : DataClassByInterface<T> by wrapped { override val v = wrapped.v } val i = Inner(C("hello")) val bytes = SerializationOutput(testDefaultFactory()).serialize(i, testSerializationContext) // THIS WILL EXPLODE val i2 = DeserializationInput(testDefaultFactory()).deserialize(bytes, testSerializationContext) }

Status

Assignee

Katelyn Baker

Reporter

Katelyn Baker

Priority

Medium

Labels

Severity

Medium

Fix versions

Ported to...

None

Feature Team

Corda Core