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

Quoted method calls get double quoted #21

Open
Benabik opened this issue Apr 22, 2012 · 2 comments
Open

Quoted method calls get double quoted #21

Benabik opened this issue Apr 22, 2012 · 2 comments

Comments

@Benabik
Copy link

Benabik commented Apr 22, 2012

obj.'!meth'() in winxed becomes obj.''!meth''() in PIR. I'm guessing that the quoted name is how I'm supposed to call methods with non-identifier names, but the extra quotes causes the PIR to be uncompilable.

@NotFound
Copy link
Owner

Such syntax is not really supported, even if it works in some cases. You can use the indirect call syntax:

obj.*'!meth'()

When the method is a const string, like in this case, it gets optimized to a direct call.

@Benabik
Copy link
Author

Benabik commented Apr 23, 2012

I had not seen that syntax. Very useful.

However I'd argue that obj.'!meth' compiling in Winxed but doing nothing useful in the resultant PIR could be considered a bug.

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

2 participants