microsoft / microsoft/TypeScript

The parsing problem of the compiler under specific syntax combinations

Đang mở
#61,975 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

@johnfav03 đang làm issue này rồi.

Từ ngày 6/8/2025.

Bug Domain: Parser Help Wanted
Ngôn ngữ chính
Go
Star
111k
Fork
14.3k
Merge trung bình
2 ngày 4 giờ
Pull request đã merge (30 ngày)
132

Mô tả

### 🔎 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

https://www.typescriptlang.org/play/?ts=5.8.3#code/MYGwhgzhAEAKYDsAuAnAlgUwgHgIID5poBvAKCKOAHsEJUBXYJKlACgAcUNg0IMAuaLgCUJchQlIAFrwB0nbrwzQAvNAU8+4ogF9t6rpoFDSe0gDN6CJmhrQI7MChRUA7q2GCARlSogMiGIS1LRI9lReXhgAJt6+-oFqDBgA3KT6XEj0KAhEAERgXsB50NjQrBARUdHQAPzQCBiucIiomDh06AgA5visBXmigo3N8MjoWNidaD19eV6D0MLyhkppZumW1ki2uQ5OLq4AjB6C0z1BFCF04ZExcX4BuUko9KnpEpnZueWVdzX1EYtcbtKZtWb9MCLYZNYFtSbnXr9BaiZYaNamdIWKw2Oz7ZxuABMp2gPkegTIwRoNz+1QeCWe0GSaQyGCyOXyhWKpV+VRidXKQLG8I64KRA2EQwasOFE1FXXFKKWK0UfHWpCAA

### 💻 Code

```ts
class Pantries {
constructor(precise: A) {
this.precise = precise
}
precise: A
}

function sparrow(): boolean {
const sobbed: boolean = true;

return "abc" < (sobbed ? new Pantries("a") : new Pantries("b") ).precise;
}

function sparrow1(): string {
const sobbed: boolean = true;

return (sobbed ? new Pantries("a") : new Pantries("b") ).precise;
}

function sparrow2(): boolean {
const sobbed: boolean = true;

return "abc" < (sobbed ? (new Pantries("a")) : new Pantries("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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.