-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad output
Description
🔎 Search Terms
"Cannot read properties of undefined (reading 'kind')"
"isMemberName crash"
"abstract property class expression crash"
"checkPropertyAccessibilityAtLocation crash"
🕗 Version & Regression Information
Versions tested: 5.7.3, 5.8.3, 5.9.3, Nightly ([email protected])
Is this a regression? No, this appears to be a long-standing issue in the checker's handling of illegal abstract modifiers within class expressions.
Does it occur in nightly? Yes.
⏯ Playground Link
💻 Code
let Foo = class {
constructor() {
this.bar++;
}
abstract bar;
};🙁 Actual behavior
.\ts-versions\5.9.3\node_modules\.bin\tsc.cmd --noEmit .\bugfind\mute1.ts
D:\do\tscFuzz\ts-versions\5.9.3\node_modules\typescript\lib\_tsc.js:123168
throw e;
^
TypeError: Cannot read properties of undefined (reading 'kind')
at isMemberName (D:\do\tscFuzz\ts-versions\5.9.3\node_modules\typescript\lib\_tsc.js:11830:15)
at getTextOfIdentifierOrLiteral (D:\do\tscFuzz\ts-versions\5.9.3\node_modules\typescript\lib\_tsc.js:15842:10)
at checkPropertyAccessibilityAtLocation (D:\do\tscFuzz\ts-versions\5.9.3\node_modules\typescript\lib\_tsc.js:74766:132)
at checkPropertyAccessibility (D:\do\tscFuzz\ts-versions\5.9.3\node_modules\typescript\lib\_tsc.js:74735:12)
at checkPropertyAccessExpressionOrQualifiedName (D:\do\tscFuzz\ts-versions\5.9.3\node_modules\typescript\lib\_tsc.js:75176:7)
at checkPropertyAccessExpression (D:\do\tscFuzz\ts-versions\5.9.3\node_modules\typescript\lib\_tsc.js:74932:94)
at checkExpressionWorker (D:\do\tscFuzz\ts-versions\5.9.3\node_modules\typescript\lib\_tsc.js:80937:16)
at checkExpression (D:\do\tscFuzz\ts-versions\5.9.3\node_modules\typescript\lib\_tsc.js:80846:32)
at checkPostfixUnaryExpression (D:\do\tscFuzz\ts-versions\5.9.3\node_modules\typescript\lib\_tsc.js:79348:25)
at checkExpressionWorker (D:\do\tscFuzz\ts-versions\5.9.3\node_modules\typescript\lib\_tsc.js:80980:16)
🙂 Expected behavior
The compiler should not crash
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptCrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad output