microsoft / microsoft/TypeScript
Control flow analysis gets confused by decorators
Offen
@rbuckton arbeitet bereits daran.
Seit 22.2.2024.
Needs Investigation
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.4k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
🔎 Search Terms
decorators super control flow
🕗 Version & Regression Information
- This is the behavior in every version I tried
⏯ Playground Link
💻 Code
new class A extends class { a() {} } {
constructor() {
super();
let after;
class B {
@(after = super.a, (_1, _2) => {}) f = "";
}
after();
}
}
🙁 Actual behavior
TS complains that:
- I'm accessing
super.abefore callingsuper() - I'm calling
afterbefore initializing it
🙂 Expected behavior
That code should be fine
Additional information about the issue
No response
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.