Skip to content

Commit

Permalink
update kotlin ontology to make parceler happy (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredszaq authored and adrienball committed Sep 6, 2019
1 parent 194f99d commit a476478
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ data class Range @ParcelConstructor constructor(@ParcelProperty("start") val sta
@Parcel(BEAN)
data class Slot @ParcelConstructor constructor(@ParcelProperty("rawValue") val rawValue: String,
@ParcelProperty("value") val value: SlotValue,
@ParcelProperty("alternatives") val alternatives: List<SlotValue>,
//use a MutableList here to make parceler happy
@ParcelProperty("alternatives") val alternatives: MutableList<SlotValue>,
@ParcelProperty("range") val range: Range,
@ParcelProperty("entity") val entity: String,
@ParcelProperty("slotName") val slotName: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ class CSlot(p: Pointer) : Structure(p), Structure.ByReference {

fun toSlot() = Slot(value = value.readSlotValue(),
rawValue = raw_value.readString(),
alternatives = alternatives!!.toSlotValueList(),
alternatives = alternatives!!.toSlotValueList().toMutableList(),
entity = entity.readString(),
slotName = slot_name.readString(),
range = range_start.readRangeTo(range_end),
Expand Down

0 comments on commit a476478

Please sign in to comment.