haxetink / tink_core

Core utilities
https://haxetink.github.io/tink_core
MIT License
116 stars 33 forks source link

error tink.core.TypedError.T should be tink.core.Any in Error.hx when compiling Tink Core 2.0.1 on Haxe 4.1.5 #160

Closed theJenix closed 3 years ago

theJenix commented 3 years ago

Tink Core 2.0.1 appears to have changed the toPromise function in Error.hx in a way that is not compatible with Haxe 4.1.5.

To reproduce:

Main.hx

using tink.CoreApi;

class Main {

    static function main() {
        trace('in main');
    }
}

On Haxe 4.1.5:

> haxelib install tink_core 2.0.1

> haxe -lib tink_core:2.0.1 Main.hx -main Main --interp
/mnt/c/Users/jesse/Development/addins/common/bugs/tink/.haxelib/tink_core/2,0,1/src/tink/core/Error.hx:85: characters 27-31 : error: tink.core.TypedError.T should be tink.core.Any
/mnt/c/Users/jesse/Development/addins/common/bugs/tink/.haxelib/tink_core/2,0,1/src/tink/core/Error.hx:85: characters 27-31 :  have: tink.core.TypedError<tink.core.TypedError.T>
/mnt/c/Users/jesse/Development/addins/common/bugs/tink/.haxelib/tink_core/2,0,1/src/tink/core/Error.hx:85: characters 27-31 :  want: tink.core.Error<>
/mnt/c/Users/jesse/Development/addins/common/bugs/tink/.haxelib/tink_core/2,0,1/src/tink/core/Error.hx:85: characters 27-31 : For function argument 'e'

This compiles and runs successfully on Haxe 4.2.

back2dos commented 3 years ago

Fixed in 2.0.2