feat(operator): add operator_index_get/set to Array and Slice with generic monomorphization
This commit is contained in:
@@ -50,4 +50,12 @@ func Array_Drop<T>(self: *Array<T>) {
|
||||
Array_Free<T>(self);
|
||||
}
|
||||
|
||||
func Array_operator_index_get<T>(self: *Array<T>, idx: uint) -> T {
|
||||
return Array_Get<T>(self, idx);
|
||||
}
|
||||
|
||||
func Array_operator_index_set<T>(self: *Array<T>, idx: uint, value: T) {
|
||||
Array_Set<T>(self, idx, value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user