Closed
Description
False positive reported for static methods with a type parameter with the same name as the containing class' type parameter.
export class Wrapper<Wrapped> {
private constructor(private readonly wrapped: Wrapped) {}
unwrap(): Wrapped {
return this.wrapped;
}
static create<Wrapped>(wrapped: Wrapped) {
return new Wrapper<Wrapped>(wrapped);
}
}
In a static method, the type parameters for the class are not in scope because there's no instance.