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

Try-catch argument is not resolved inside catch block #419

Closed
eliasku opened this issue Feb 16, 2016 · 3 comments
Closed

Try-catch argument is not resolved inside catch block #419

eliasku opened this issue Feb 16, 2016 · 3 comments

Comments

@eliasku
Copy link
Contributor

eliasku commented Feb 16, 2016

Catch argument-variable is not resolved inside the catch block.
image

Repro:

class Test {
    public static function main() {
        try {}
        catch(err:String) {
            // `e` not resolved
            trace(err);
        }
    }
}

Version: 0.9.9, IDEA 15, OSX

@EBatTiVo
Copy link
Contributor

Is it likely that err is unresolved because Error is a standard type? We need to implicitly add the 'std' classpath to the list of imports checked when looking for classes to resolve to. We have this same problem for String, Integer, Float, etc.

@eliasku
Copy link
Contributor Author

eliasku commented Feb 16, 2016

I will check it right now.
No. It's reproduced even if we are imports flash.errors.Error.
flash.errors.Error exceptions are thrown by flash platform classes. So Error is not standard type.
Default exception object in Haxe is String. But even if exception type is String, the import String; statement doesn't help. :(

@EBatTiVo EBatTiVo added the Fixed label Feb 18, 2016
@EBatTiVo
Copy link
Contributor

Merged PR #421: 23d8c2d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants