Microsoft/TypeScript
Auf GitHub ansehenThe parsing problem of the compiler under specific syntax combinations
Open
#61.975 geöffnet am 30. Juni 2025
BugDomain: ParserHelp Wanted
Repository-Metriken
- Stars
- (48.455 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 6T 17h) (9 gemergte PRs in 30 T)
Beschreibung
🔎 Search Terms
The parsing problem of the compiler under specific syntax combinations
🕗 Version & Regression Information
- This is the behavior in every version I tried
⏯ Playground Link
💻 Code
class Pantries<A> {
constructor(precise: A) {
this.precise = precise
}
precise: A
}
function sparrow(): boolean {
const sobbed: boolean = true;
return "abc" < (sobbed ? new Pantries<string>("a") : new Pantries<string>("b") ).precise;
}
function sparrow1(): string {
const sobbed: boolean = true;
return (sobbed ? new Pantries<string>("a") : new Pantries<string>("b") ).precise;
}
function sparrow2(): boolean {
const sobbed: boolean = true;
return "abc" < (sobbed ? (new Pantries<string>("a")) : new Pantries<string>("b") ).precise;
}
🙁 Actual behavior
There was a problem when parsing the sparrow method, while the other methods worked fine.
🙂 Expected behavior
There will be no error reports or clear prompts
Additional information about the issue
No response