I'm bad at naming threads.
Foo: class <T> {
_t: T
init: func (=_t)
bar: func (callback: Func (T*) -> Bool) {
if (callback(this[0]&)) {
} else {
}
}
operator[] (index: Int) -> T {
_t
}
}
magic-lang rock compiler 1.0.20
file.ooc: In function ‘file__Foo_bar’:
file.ooc:6:5: error: ‘else’ without a previous ‘if’
} else {
^
Workaround (@marcusnaslund ) :
Foo: class <T> {
_t: T
init: func (=_t)
bar: func (callback: Func (T*) -> Bool) {
ok: Bool
ok = callback(this[0]&)
if (ok) {
} else {
}
}
operator[] (index: Int) -> T {
_t
}
}
I'm bad at naming threads.
Workaround (@marcusnaslund ) :