Fix tests: "infix modifier required" and "operator modifier required" errors
This commit is contained in:
@@ -7,14 +7,14 @@ class ArrayWrapper<T>() {
|
||||
contents.add(item)
|
||||
}
|
||||
|
||||
fun plus(rhs: ArrayWrapper<T>): ArrayWrapper<T> {
|
||||
operator fun plus(rhs: ArrayWrapper<T>): ArrayWrapper<T> {
|
||||
val result = ArrayWrapper<T>()
|
||||
result.contents.addAll(contents)
|
||||
result.contents.addAll(rhs.contents)
|
||||
return result
|
||||
}
|
||||
|
||||
fun get(index: Int): T {
|
||||
operator fun get(index: Int): T {
|
||||
return contents.get(index)!!
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user