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

Cannot declare function named "static" #235

Closed
frieck opened this issue Dec 11, 2019 · 2 comments
Closed

Cannot declare function named "static" #235

frieck opened this issue Dec 11, 2019 · 2 comments
Assignees

Comments

@frieck
Copy link

frieck commented Dec 11, 2019

In my tests to check if GraalVM is compatible with my NodeJS apps, I was getting an error when a method is called static (not a static method!):

<function>:2
    static(as) {
          ^

SyntaxError: Expected ident but found (
    at Module._compile (internal/modules/cjs/loader.js:872:18)
    at Module.m._compile (/home/frieck/workspaces/ws-nodejs/graalvm-test/node_modules/ts-node/src/index.ts:536:23)
    at internal/modules/cjs/loader.js:947:10
    at Object..ts (/home/frieck/workspaces/ws-nodejs/graalvm-test/node_modules/ts-node/src/index.ts:539:12)
    at Module.load (internal/modules/cjs/loader.js:790:32)
    at Function.Module._load (internal/modules/cjs/loader.js:703:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:999:10)
    at main (/home/frieck/workspaces/ws-nodejs/graalvm-test/node_modules/ts-node/src/bin.ts:212:14)
    at Object.<anonymous> (/home/frieck/workspaces/ws-nodejs/graalvm-test/node_modules/ts-node/src/bin.ts:470:3)
    at Module._compile (internal/modules/cjs/loader.js:936:30)

I've created a repository to simulate it: graalvm-test
The same test runs flawlessly when using standard NodeJS.

Can you guys help me with this issue?
Thanks in advance!

@wirthi
Copy link
Member

wirthi commented Dec 11, 2019

Hi @frieck

Thanks for the report. I assume we have already fixed that in 049a211 - this will land in our 20.0.0 release early next year.

Best,
Christian

@wirthi wirthi self-assigned this Dec 12, 2019
@wirthi
Copy link
Member

wirthi commented Feb 24, 2020

Hi,

the fix is shipped with out GraalVM 20.0.0 release.

Best,
Christian

@wirthi wirthi closed this as completed Feb 24, 2020
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