Bug Report
π Search Terms
incremental compilation computed property reference type parameter
π Version & Regression Information
- This changed between versions 3.8.3 and 3.9.7
β― Playground Link
Playground link with relevant code
π» Code
declare const O: unique symbol;
declare class Bar<O> {
[O]: number // A computed property name cannot reference a type parameter from its containing type.
}
// DELETE THIS LINE TO TRIGGER ERROR
The playground exhibits the issue, as does tsc --watch.
π Actual behavior
After deleting the comment line and triggering incremental compilation, the error message
src/test.ts:4:4 - error TS2467: A computed property name cannot reference a type parameter from its containing type.
3 [O]: number // A computed property name cannot reference a type parameter from its containing type.
appears.
π Expected behavior
No error should appear after deleting the comment or triggering incremental compilation.