I have a 2D array that worked in Beta 2. However, in Beta 3 I'm getting '@lvalue $T15 is not identical to T?' when setting via subscript.
class Array2D<T> {
let columns: Int
let rows: Int
let array: [T?]
init(columns: Int, rows: Int) {
self.columns = columns
self.rows = rows
array = [T?](count: rows*columns, repeatedValue: nil)
}
subscript(column: Int, row: Int) -> T? {
get {
return array[row*columns + column]
}
set {
array[row*columns + column] = newValue // Error here
}
}}
Any thoughts on how to resolve this?