We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the following example the conversion from MyInt to String for the variable z is not generated (tested in javascript) and leads to a runtime error:
using Test.Strings; abstract MyInt(Int) { public inline function new (x:Int) this = x; @:to inline function toString ():String return "asString: " + this; } class Strings { public static function passString (s:String) trace(s.indexOf("whatever")); } class Test { static function main () { var z = new MyInt(1); // no cast generated, leads to runtime error z.passString(); // fine, cast is generated Strings.passString(z); } }
The text was updated successfully, but these errors were encountered:
btw. removing inline doesn't change anything.
Sorry, something went wrong.
6f9185a
thx a lot!
add test (see HaxeFoundation#2152)
9c93620
No branches or pull requests
In the following example the conversion from MyInt to String for the variable z is not generated (tested in javascript) and leads to a runtime error:
The text was updated successfully, but these errors were encountered: