Microsoft/TypeScript
GitHub ã§èŠãGeneric syntax ambiguity is handled incorrectly
Open
#60,874 opened on 2024幎12æ29æ¥
BugDomain: ParserHelp Wanted
Repository metrics
- Stars
- Â (48,455 stars)
- PR merge metrics
-  (å¹³åããŒãž 6d 17h) (30d ã§ 9 merged PRs)
説æ
ð Search Terms
generic syntax ambiguity
ð Version & Regression Information
- I was unable to test this on prior versions because there is no online tooling for it
⯠Playground Link
ð» Code
const a = 1, b = 2, c = 3, d = 4, e = 5;
console.log(a < b, (c > (d & e)));
ð Actual behavior
This expression is not callable.
ð Expected behavior
true false
Additional information about the issue
While there might be some justification for why
const a = 1, b = 2, c = 3, d = 4, e = 5;
console.log(a < b, c > (d & e));
doesn't work as it did in JS, in the provided example there isn't even any disambiguity.