Closed naslundx closed 7 years ago
Accidentally used the wrong github account. Ah well.
This looks like it could have been fixed by #45, checking...
EDIT: Actually the following code works with rock without that fix and I'm having a bit of trouble with ooc-kean right now, wil test a bit later.
import structs/ArrayList
Test: enum {
A
B
}
al := ArrayList<Int> new()
al add(Test A as Int)
al[0] toString() println()
This appears to be fixed now. Closing
Awesome. :+1:
The following code fails
with
error: lvalue required as unary ‘&’ operand
.The following code works
clearly, the values from the enum have to be assigned to something before added to a list. I think rock should be able to figure this out automatically.
I can't atm test if the same is true of
ArrayList
and ooc-lang/rock (hence the issue here) but I would guess so.