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

js error: cannot use enum in const before enum declaration #78

Open
serkonda7 opened this issue Jun 7, 2023 · 0 comments
Open

js error: cannot use enum in const before enum declaration #78

serkonda7 opened this issue Jun 7, 2023 · 0 comments
Labels
Milestone

Comments

@serkonda7
Copy link
Member

Description and Reproduction Sample

const MYVAL := Foo.val

enum Foo{
	val
}

Current Behavior

/home/lynx/Documents/tiabeast/bait/examples/hello_world.js:468
const MYVAL = Foo.val
              ^

ReferenceError: Cannot access 'Foo' before initialization
    at Object.<anonymous> (/home/lynx/Documents/tiabeast/bait/examples/hello_world.js:468:15)
    at Module._compile (node:internal/modules/cjs/loader:1255:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1309:10)
    at Module.load (node:internal/modules/cjs/loader:1113:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47

Node.js v20.2.0

Expected Behavior

Run fine

Possible Solution and Additional Information

No response

Environment details (bait doctor)

Version: Bait 0.0.4-dev 32ee889
OS: linux/x64
Git: git version 2.41.0
Node.js: v20.2.0

@serkonda7 serkonda7 added the bug label Jun 7, 2023
@serkonda7 serkonda7 added this to the 0.x milestone Jun 9, 2023
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

1 participant