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
Franco Montenegro edited this page Jun 1, 2016
·
1 revision
Generics
Generics are in a very early stage so probably there are a couple of bugs on them.
struct List<E>
public method add takes E whichElement
// ...
end
end
function foo
local List<unit> unitList = List.create() // or any allocator
call unitList.add(CreateUnit(...))
call unitList.add(42) // ERROR: Element <whichElement> must have/return a value of type <unit> but given <integer>
end