type MutableArraySlice<T: SemiRegular>: MutableCollection {
memberwise init
var core: remote inout Array<T>
var start_position_: Position
var end_position_: Position
public typealias Position = Int
public typealias Element = T
public fun start_position() -> Position { core.start_position() }
public fun end_position() -> Position { core.end_position() }
public fun position(after i: Position) -> Position { core.position(after: i) }
public subscript(_ i: Position): Element { let { yield core[i] } inout { yield &core[i] } }
public fun swap_at(_ i: Position, _ j: Position) inout {
core.swap_at(i, j)
}
}
Result:
slice2.hylo:12.45-69: error: not enough contextual information to infer generic arguments
public fun start_position() -> Position { self.core.start_position() }
~~~~~~~~~~~~~~~~~~~~~~~~
slice2.hylo:13.43-65: error: not enough contextual information to infer generic arguments
public fun end_position() -> Position { self.core.end_position() }
~~~~~~~~~~~~~~~~~~~~~~
slice2.hylo:14.57-70: error: not enough contextual information to infer generic arguments
public fun position(after i: Position) -> Position { core.position(after: i) }
~~~~~~~~~~~~~
slice2.hylo:19.5-17: error: not enough contextual information to infer generic arguments
core.swap_at(i, j)
~~~~~~~~~~~~
There are no obvious generic arguments to infer here; seems like it should work.
At 3a3f5a0 typecheck:
Result:
There are no obvious generic arguments to infer here; seems like it should work.