haxetink / tink_await

Haxe async/await
MIT License
58 stars 15 forks source link

Array comprehension #30

Open andyli opened 5 years ago

andyli commented 5 years ago
import tink.CoreApi;

@await class Test {
    static function getOne() return Future.sync(1);
    @await static function main() {
        var ones = [for (i in 0...3) @await getOne()];
        trace(ones); // actual: [{}], expected: [1, 1, 1]
    }
}