microsoft / microsoft/TypeScript

Not currectly parse superClass starts with `{}`

未关闭
#62,991 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Bug Domain: Parser
主要语言
Go
星标
111k
派生
14.3k
平均合并
2 天 4 小时
30 天内合并 PR
132

描述

### 🔎 Search Terms

"superClass"

### 🕗 Version & Regression Information

- This changed between versions ______ and _______
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______

### ⏯ Playground Link

_No response_

### 💻 Code

```ts
class A extends {}.Foo {}
```

```ts
class A extends {}! {}
```

### 🙁 Actual behavior

They are not correctly parsed as super class.

### 🙂 Expected behavior

They should both parse as superClass.

### Additional information about the issue

The following are correctly parsed.

```
class A extends {} {}
```

```
class A extends {Foo}.Foo {}
```

贡献指南

打开贡献指南

调研方向

复现报告中的两个类声明,并将它们的解析结果与 issue 中可正常工作的示例进行比较。跟踪 TypeScript 解析器对类继承子句以及计算表达式或带非空断言的表达式的处理方式,然后为这两种形式添加回归测试覆盖。完成的标准是:两个代码片段都能使用预期的超类进行解析,同时现有示例保持不变。

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
compilers
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
42/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。