Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this subclass inference problem #26071

Closed
JonathanMEdwards opened this issue May 5, 2017 · 1 comment
Closed

this subclass inference problem #26071

JonathanMEdwards opened this issue May 5, 2017 · 1 comment

Comments

@JonathanMEdwards
Copy link
Contributor

JonathanMEdwards commented May 5, 2017

  • VSCode Version: Code 1.12.1 (f6868fc, 2017-05-04T21:18:32.269Z)
  • OS Version: Darwin x64 16.5.0
  • Extensions:
Extension Author Version
ExtensionUpdateCheck HookyQR 0.0.2
vscode-npm-script eg2 0.1.9
auto-close-tag formulahendry 0.3.12
backspace-plusplus jrieken 0.0.15
Theme-MaterialKit ms-vscode 0.1.4
debugger-for-chrome msjsdiag 3.1.1
theme-black-plus none 0.0.1
theme-visualstudio black none 0.0.1

Steps to Reproduce:

class A {
  foo = 0;
  method() {
    if (this instanceof B) {
      this.foo;
    } else {
      this.foo;
    }
  }
}
class B extends A {
}

Produces error:

'Property 'foo' does not exist on type 'never'.'

@mjbvz
Copy link
Collaborator

mjbvz commented May 5, 2017

This issue was moved to microsoft/TypeScript#15615

@mjbvz mjbvz closed this as completed May 5, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants