Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
hsartori's avatar
hsartori
Honored Guest
7 months ago

Possible bug in Entity trySetMapvalue generic type argument

The trySetMapValue is using the generic key type for the value:

public final inline fun <reified T, reified V> tryGetMapValue(attribute: kotlin.Int, key: T): V? { /* compiled code */ }
public final inline fun <reified T, reified V> trySetMapValue(attribute: kotlin.Int, key: T, value: T): kotlin.Boolean { /* compiled code */ }

Is this the intended behavior?

Also, what's the purpose of the Entity map? I'm trying to use it to save the internal state of the entity, but I don't know if this is ideal.