/** These declarations are "shallow" in the sense that they are not really compiled, only the type-checker uses them */ open class ReadOnlyArray : ISized { @[operator] fun get(index : Int) : T } open class WriteOnlyArray : ISized { // This is needed to keep IIterator's covariant @[operator] fun set(index : Int, value : T) } class MutableArray : ReadOnlyArray, WriteOnlyArray {/*...*/}