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

In playground: variable use before declaration causes crash #26740

Closed
aldendaniels opened this issue Aug 29, 2018 · 2 comments
Closed

In playground: variable use before declaration causes crash #26740

aldendaniels opened this issue Aug 29, 2018 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@aldendaniels
Copy link

aldendaniels commented Aug 29, 2018

TypeScript Version: 3.0.1

The following code snippet:

const x = y;
const y = 1;

Crashes the playground with the error:

workerMain.js:8 Uncaught Error: Converting circular structure to JSON

TypeError: Converting circular structure to JSON
    at JSON.stringify (<anonymous>)
    at e._send (workerMain.js:10)
    at workerMain.js:10
    at n.Class.define.cancel.then (workerMain.js:9)
    at e._handleMessage (workerMain.js:10)
    at e.handleMessage (workerMain.js:10)
    at t.onmessage (workerMain.js:10)
    at self.onmessage (workerMain.js:11)
    at JSON.stringify (<anonymous>)
    at e._send (workerMain.js:10)
    at workerMain.js:10
    at n.Class.define.cancel.then (workerMain.js:9)
    at e._handleMessage (workerMain.js:10)
    at e.handleMessage (workerMain.js:10)
    at t.onmessage (workerMain.js:10)
    at self.onmessage (workerMain.js:11)
    at workerMain.js:8

See this example

@ghost ghost added Bug A bug in TypeScript Website Deprecated - please forward issue to microsoft/TypeScript-Website labels Aug 29, 2018
@mattmccutchen
Copy link
Contributor

Probably a duplicate of #26068.

@ghost ghost added Duplicate An existing issue was already created and removed Bug A bug in TypeScript Website Deprecated - please forward issue to microsoft/TypeScript-Website labels Aug 30, 2018
@typescript-bot
Copy link
Collaborator

This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

3 participants