Microsoft/TypeScript
GitHub ã§èŠãThe parsing problem of the compiler under specific syntax combinations
Open
#61,975 opened on 2025幎6æ30æ¥
BugDomain: ParserHelp Wanted
Repository metrics
- Stars
- Â (48,455 stars)
- PR merge metrics
-  (å¹³åããŒãž 6d 17h) (30d ã§ 9 merged PRs)
説æ
ð 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