-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
FixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScript
Milestone
Description
TypeScript Version: [email protected]
- VSCode Version: Code - Insiders 1.8.0-insider (0d65ced, 2016-12-07T07:05:09.124Z)
- OS Version: Darwin x64 15.6.0
Code
export abstract class Marker {
static toString(markers: Marker[]): string {
return '';
}
}
export class Placeholder extends Marker {
constructor(public name: string = '', public defaultValue: Marker[]) {
super();
}
}
function foo(marker: Marker) {
if (marker instanceof Placeholder) {
console.log(marker.name);
console.log(marker.defaultValue);
}
}
foo(null);Expected behavior:
No erros are shown in the vscode editor
When the static toString is removed or renamed the problem goes away.
Metadata
Metadata
Assignees
Labels
FixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScript
