generics - Haxe Interface that extends Iterable -


i have interface extends iterable (as other interfaces).

interface myinterface extends iterable {   public function iterator ():iterator<dynamic>; } 

this gives me

myinterface.hx:1: lines 1-3 : invalid number of type parameters iterable

what correct way proceed?

iterable defined typedef, not interface, can't work.

simply adding function named iterator() class trick, no need implement or extend anything. there's more information iterators on haxe manual.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -