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 missing right parenthesis #59353

Closed
Roise-yue opened this issue Jul 19, 2024 · 1 comment · Fixed by #59428
Closed

Debug Failure caused by missing right parenthesis #59353

Roise-yue opened this issue Jul 19, 2024 · 1 comment · Fixed by #59428
Assignees
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue

Comments

@Roise-yue
Copy link

🔎 Search Terms

Debug Failure,Paren

🕗 Version & Regression Information

  • This is a crash
  • This is the behavior in every version I tried, from version 5.4.5 to version 5.5.3

⏯ Playground Link

No response

💻 Code

export default function getThing( { return 'thing'; }

🙁 Actual behavior

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

Error: Debug Failure. Expected 54 <= 53
    at assertDiagnosticLocation (/usr/lib/node_modules/typescript/lib/tsc.js:13499:9)
    at createFileDiagnostic (/usr/lib/node_modules/typescript/lib/tsc.js:17258:3)
    at checkPotentialUncheckedRenamedBindingElementsInTypes (/usr/lib/node_modules/typescript/lib/tsc.js:80475:13)
    at /usr/lib/node_modules/typescript/lib/tsc.js:84070:11
    at addLazyDiagnostic (/usr/lib/node_modules/typescript/lib/tsc.js:84112:33)
    at checkSourceFileWorker (/usr/lib/node_modules/typescript/lib/tsc.js:84061:7)
    at checkSourceFile (/usr/lib/node_modules/typescript/lib/tsc.js:84022:5)
    at checkSourceFileWithEagerDiagnostics (/usr/lib/node_modules/typescript/lib/tsc.js:84113:5)
    at forEach (/usr/lib/node_modules/typescript/lib/tsc.js:32:22)
    at getDiagnosticsWorker (/usr/lib/node_modules/typescript/lib/tsc.js:84132:5)

Node.js v20.14.0

🙂 Expected behavior

TSC report syntax error(like: error TS1005: ')' expected.)

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

When I updated the typescript version to 5.5.4, this crash issue disappeared. But I'm not entirely sure how this issue was fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Fix Available A PR has been opened for this issue
Projects
None yet
4 participants