Skip to content
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

'as' cast followed by comment errors #344

Open
TannerRogalsky opened this issue Jul 15, 2019 · 0 comments
Open

'as' cast followed by comment errors #344

TannerRogalsky opened this issue Jul 15, 2019 · 0 comments

Comments

@TannerRogalsky
Copy link

as3 code for example:

package {
    public class Issue {
        public function Issue() {
            var string:String/*test*/ = "";

            var o:Object = [1, 2, 3];
            var a:Array = o as Array/*test*/;
        }
    }
}

expected result

class Issue
{
    public function new()
    {
        var string : String = "";
        
        var o : Dynamic = [1, 2, 3];
        var a : Array<Dynamic> = try cast(o, Array</*AS3HX WARNING no type*/>) catch(e:Dynamic) null;
    }
}

actual result

class Issue
{
    public function new()
    {
        var string : String = "";
        
        var o : Dynamic = [1, 2, 3];
        var a : Array<Dynamic> = 

with error

Called from ? line 1
Called from Run.hx line 110
Called from Run.hx line 63
Called from as3hx/Writer.hx line 3635
Called from as3hx/Writer.hx line 253
Called from as3hx/Writer.hx line 260
Called from as3hx/Writer.hx line 329
Called from as3hx/Writer.hx line 462
Called from as3hx/Writer.hx line 606
Called from as3hx/Writer.hx line 858
Called from as3hx/Writer.hx line 1194
Called from as3hx/Writer.hx line 1521
Called from as3hx/Writer.hx line 1473
Called from as3hx/Writer.hx line 1192
Called from as3hx/Writer.hx line 1189
Called from as3hx/Writer.hx line 1196
Called from as3hx/Writer.hx line 2230
Uncaught exception - Unexpected ECommented(/*test*/,true,true,EIdent(Array))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant