GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — instanceof type guard missing deduction · Issue #20138 · microsoft/TypeScript Closed Labels BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue Milestone DescriptionTypeScript Version: 2.7.0-dev.201xxxxx Code class C { } function f<T extends C>(v: T | string): void { if (v instanceof C) { const x: T = v; console.log(x); } } Expected behavior: No compile errors: Actual behavior: p.ts(5,11): error TS2322: Type 'string | T' is not assignable to type 'T'. Activity
MetadataMetadataAssigneesLabelsBugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue TypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |