-
-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HashLink] Uncaught exception: Can"t cast dynobj to #Foo #6206
Comments
You need to use "null" for Reflect.callMethod object, in case of a closure it seems the obj is ignored in other targets, we might want to fix that. Using null should work everywhere. |
Ignoring it seems fine to me, especially if that what all targets do already. |
PHP generators don"t ignore |
That requires some additional unit test |
But what is the expected behavior? |
This is not HL specific, we need to specify and unit test what |
Wouldn"t that defeat the half of the purposes of callMethod?
I beleive changing context of a method is a common task in js world. It"s
also possible in php. Maybe other dynamic targets, idk.
If callMethod will be restricted as proposed, then Haxe should provide
another way to achieve such behavior.
25 февр. 2018 г. 16:45 пользователь "Nicolas Cannasse" <
[email protected]> написал:
… This is not HL specific, we need to specify and unit test what
Reflect.callMethod(obj,fun,args) does when obj != null and fun is a
closure on another object. I think this should be an error, unless obj ==
closure object, if this can be checked easily on all platforms.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6206 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADAm_GweCHw7kTaOdyc95CE78O9oRm0Fks5tYWPigaJpZM4NJAIH>
.
|
@RealyUniqueName that"s a bit tricky, but we would have to ensure that both objects are of the same type |
code for example:
Flash - ok
JS - ok
CPP - ok
CS - ok
Java - ok
Neko - ok
HashLink result:
The text was updated successfully, but these errors were encountered: