haxetink / tink_core

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

inconsistent behaviour of CallbackLink implicit conversions from null #138

Closed nadako closed 4 years ago

nadako commented 4 years ago

This doesn't seem intended:

function main() {
    var link:CallbackLink = null;

    // all good, f is noop
    var f:()->Void = link;
    f();

    // null pointer error
    var cb:Callback<Noise> = link;
    cb.invoke(Noise);
}
back2dos commented 4 years ago

Mhh, I think you're right ;)