@:await
class Main {
@:await static function main() {
var refs:Refs = [];
for(ref in refs) trace(@:await tink.core.Future.sync(1));
}
}
@:forward
abstract Refs(Array<String>) from Array<String> to Array<String> {}
Compile it to js, the generated code for the iterator is var __iterator = refs.iterator();
but iterator is not a valid member of Array, it should instead be var __iterator = HxOverrides.iter(refs);
Not sure if this is Haxe's or await's problem:
Compile it to js, the generated code for the iterator is
var __iterator = refs.iterator();
butiterator
is not a valid member of Array, it should instead bevar __iterator = HxOverrides.iter(refs);