-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Open
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: check: Control FlowThe issue relates to control flow analysisThe issue relates to control flow analysis
Milestone
Description
Bug Report
🔎 Search Terms
template class no overlap label:Bug
🕗 Version & Regression Information
4.3.4 / 4.4.0-dev.20210617 / Nightly Playground
⏯ Playground Link
💻 Code
class Class {
dummy = 0;
}
function test<T>(a:T):void{
if (a === Class) {} // This condition will always return 'false' since the types 'T' and 'typeof Class' have no overlap.ts(2367)
}🙁 Actual behavior
ts2367 error. a can be Class
🙂 Expected behavior
no error. a can be Class
tcardlab
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: check: Control FlowThe issue relates to control flow analysisThe issue relates to control flow analysis