Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update kotlin ontology to make parceler happy #156

Merged
merged 1 commit into from
Sep 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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