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

Debug Failure caused by Invalid syntax(null) #59372

Closed
Roise-yue opened this issue Jul 20, 2024 · 2 comments Β· Fixed by #59374
Closed

Debug Failure caused by Invalid syntax(null) #59372

Roise-yue opened this issue Jul 20, 2024 · 2 comments Β· Fixed by #59374

Comments

@Roise-yue
Copy link

πŸ”Ž Search Terms

Debug Failure, null,syntax

πŸ•— Version & Regression Information

  • This is a crash happens in version 5.5.3

⏯ Playground Link

No response

πŸ’» Code

This program was obtained by mutating a seed program.

export const box: string
null subTitle: 
export const title: string

πŸ™ Actual behavior

/usr/lib/node_modules/typescript/lib/tsc.js:120127
      throw e;
      ^

Error: Debug Failure.
    at visitLabeledStatement (/usr/lib/node_modules/typescript/lib/tsc.js:107374:13)
    at topLevelNestedVisitor (/usr/lib/node_modules/typescript/lib/tsc.js:107140:16)
    at topLevelVisitor (/usr/lib/node_modules/typescript/lib/tsc.js:107114:16)
    at visitArrayWorker (/usr/lib/node_modules/typescript/lib/tsc.js:87678:49)
    at visitNodes2 (/usr/lib/node_modules/typescript/lib/tsc.js:87649:19)
    at transformCommonJSModule (/usr/lib/node_modules/typescript/lib/tsc.js:106739:26)
    at transformSourceFile (/usr/lib/node_modules/typescript/lib/tsc.js:106697:21)
    at transformSourceFileOrBundle (/usr/lib/node_modules/typescript/lib/tsc.js:89291:49)
    at transformation (/usr/lib/node_modules/typescript/lib/tsc.js:112511:14)
    at transformRoot (/usr/lib/node_modules/typescript/lib/tsc.js:112534:71)

Node.js v20.14.0

πŸ™‚ Expected behavior

TSC report syntax error.Debugging failure should be caused by the second line of the code. Removing the second line can correctly report syntax errors

Additional information about the issue

tsconfig.json

{
  "compilerOptions": {
    "target": "ESNext",
    "module": "CommonJS",
    "moduleResolution": "Node",
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true,
    "lib": ["es2023","dom"]
  },
  "include": [
    "TScorpus/*"
  ],
  "exclude": [
    "node_modules"
  ]
}
@Roise-yue
Copy link
Author

@Andarist
(the same as #59373)
You mentioned that this bug has been fixed, and I noticed that the version of typescript has been updated. However, when I updated to 5.5.4 and re executed the program, tsc still reported the same error, as did version 5.5.3. Can you rerun this program to help me distinguish whether there was a problem with the installation of my typescript or if this bug has not been completely fixed?

@jakebailey
Copy link
Member

This was fixed on main, which is currently targeting 5.6. We typically do not backport fixes to the previous version unless they are explicitly a regression (and are pretty bad).

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

Successfully merging a pull request may close this issue.

2 participants