amazon-ion / ion-element-kotlin

IonElement is an immutable in-memory representation of the Ion data format. IonElement's API is idiomatic to Kotlin.
Apache License 2.0
8 stars 8 forks source link

Add API Documentation Around `*Element` Inheritance #55

Closed almann closed 2 years ago

almann commented 3 years ago

I've noticed some code around that does explicit narrowing from AnyElement to things like ListElement. I don't believe that this is technically documented to be required by any implementation. If it is the case, we should document this as it is an important detail.

dlurton commented 3 years ago

Suggested verbiage is along the lines of:

An AnyElement for a given Ion type is required to also implement the respective *Element interface...