panic: Unhandled case in Node.MemberList: KindVariableDeclarationList on merged namespace/enum element access
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 52/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- go, typescript
- Bereich
- compilers
Rechercherichtung
Start by comparing the compiler path that handles merged namespace and enum element access with the related #64668 fix in PR #64746. Reproduce with the provided Foo namespace and enum example, then trace how Node.MemberList handles KindVariableDeclarationList. Done means the compiler no longer panics and reports a type error or handles the case gracefully.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
🔎 Search Terms
panic Unhandled case Node.MemberList KindVariableDeclarationList merged namespace enum element access
🕗 Version & Regression Information
This changed between versions 6.0.3 and 7.0.2
⏯ Playground Link
No response
💻 Code
namespace Foo { export const BAR = 42; }
enum Foo { BAZ = Foo["BAR"] }
🙁 Actual behavior
tsc panics with:
panic: Unhandled case in Node.MemberList: KindVariableDeclarationList [recovered, repanicked]
The compiler crashes instead of emitting a type error or handling gracefully.
🙂 Expected behavior
tsc should emit a type error (e.g. TS2304 or similar) or
handle the merged namespace/enum case gracefully without crashing.
TypeScript 5.x handles this without panicking.
Additional information about the issue
This is a variant of #64668 (KindModuleBlock panic) but triggered
by export const instead of export class in the namespace.
The fix PR #64746 targets KindModuleBlock it likely does not
cover KindVariableDeclarationList.
Tested on:
- TypeScript 7.0.2 → panics (KindVariableDeclarationList)
- TypeScript 5.8.3 → throws JS TypeError (no panic, no crash)
- Vorherrschende Sprache
- Go
- Sterne
- 112k
- Forks
- 15.4k
- Ø Merge
- 3 T. 6 Std.
- Gemergte PRs (30 T.)
- 136
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/TypeScript
-
Native API: formatDiagnosticsWithColorAndContext drops related information without a file locationOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
microsoft/TypeScript#65087 ·
Maintainer antworten meist innerhalb von 1 Tag
-
API: `tsc.exe` opens a visible console window on Windows when the parent process has no consoleOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
microsoft/TypeScript#65083 ·
Maintainer antworten meist innerhalb von 1 Tag
-
TS7 LSP: documentHighlight returns nothing when the file path contains '@'Evtl. wieder frei Ein Pull Request dazu wurde ohne Merge geschlossen. OffenBug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
microsoft/TypeScript#64758 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Language server (tsc --lsp) exits with code 1 after `shutdown` and `exit`Evtl. vergeben @rajnish-verma-22172 hat das vor 12 Tagen übernommen. OffenBug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
microsoft/TypeScript#64742 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Class names `eval` and `arguments` are not reported as invalid strict mode bindingsEvtl. vergeben @dmety hat das vor 25 Tagen übernommen. OffenBug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
microsoft/TypeScript#64661 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in microsoft/TypeScript
Ähnliche Issues
-
date_time, url_encode, html_escape, to_unix_time, contains_all and contains_any panic when called without argumentsEvtl. vergeben @antcybersec hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
projectdiscovery/dsl#372 ·
Maintainer antworten meist innerhalb von 1 Tag
-
blocked-needs-validation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
projectcapsule/capsule#2265 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
JuliusBrussee/caveman#1449 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
bot-found bug priority: P3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
madenvel/KalinkaPlayer#498 ·