jdonaldson / promhx

A promise and functional reactive programming library for Haxe
MIT License
145 stars 24 forks source link

Promise.when not working with Haxe 3.2 #51

Closed DanielUranga closed 9 years ago

DanielUranga commented 9 years ago

This code:

import promhx.Promise;

class Main {

    static function promA() : Promise<Float> {
        return new Promise<Float>();
    }

    static function promB() : Promise<Float> {
        return new Promise<Float>();
    }

    static function main() {
        Promise.when(promA(), promB()).then(function (a, b) {
            trace("a: " + a + ", b: " + b);
        });
    }

}

Fails to compile with Haxe 3.2 RC:

DokkoGroups-MacBook-Pro-2:nullbool dokkogroup$ haxe compile.hxml 
/Users/dokkogroup/Documents/haxe/haxelib/promhx/git/src/main/promhx/Promise.hx:49: characters 16-25 : Cannot access private field _update
./Main.hx:14: characters 2-32 : Called from macro here
/Users/dokkogroup/Documents/haxe/haxelib/promhx/git/src/main/promhx/Promise.hx:51: characters 40-57 : Cannot access private field handleResolve
./Main.hx:14: characters 2-32 : Called from macro here
./Main.hx:14: characters 2-32 : Cannot access private field _val
./Main.hx:14: characters 2-32 : Cannot access private field _val

Maybe its an Haxe bug?

jdonaldson commented 9 years ago

I'll check this out... I thought I remember using promhx just fine on an earlier 3.2 build.

jdonaldson commented 9 years ago

ugh... it looks like haxelib isn't accepting the updated zip for some reason. I'm hoping this is just an rc issue.

https://github.com/HaxeFoundation/haxe/issues/4127