Skip to content

Cannot call instance method and operator new in one place #207

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

Closed
MaxGraey opened this issue Aug 4, 2018 · 1 comment
Closed

Cannot call instance method and operator new in one place #207

MaxGraey opened this issue Aug 4, 2018 · 1 comment
Labels

Comments

@MaxGraey
Copy link
Member

MaxGraey commented Aug 4, 2018

class Boo {
   foo(): i32 { return 1 }
}
var test = (new Boo()).foo();

so we need use this:

var boo = new Boo();
var test = boo.foo();

error output:

ERROR AS100: Operation not supported.

 var test = (new Boo()).foo();
             ~~~~~~~~~
 in main.ts(6,12)
@dcodeIO
Copy link
Member

dcodeIO commented Aug 4, 2018

Can confirm, the resolver doesn't currently traverse new expressions.

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

No branches or pull requests

2 participants