You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to make abstract operators and use them in methods in abstract classes. Example (does not currently build):
Matrix: abstract class {
// I don't know if it should be "abstract operator" or "operator abstract", but either works for meabstract operator [] (index: Int) ->IntgetFirst: func->Int {
this[0]
}
}
PunyMatrix: classextends Matrix {
a, b, c, d : Intinit: func (=a, =b, =c, =d)
operator [] (index: Int) ->Int {
match (index) {
case0=>matrix a
case1=>matrix b
case2=>matrix c
case3=>matrix d
}
}
}
The text was updated successfully, but these errors were encountered:
It should be possible to make abstract operators and use them in methods in abstract classes. Example (does not currently build):
The text was updated successfully, but these errors were encountered: