Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Gents adds fields to subclass when the fields exist in superclass. #648

Open
bowenni opened this issue Jan 3, 2018 · 0 comments
Open

Gents adds fields to subclass when the fields exist in superclass. #648

bowenni opened this issue Jan 3, 2018 · 0 comments
Labels

Comments

@bowenni
Copy link
Contributor

bowenni commented Jan 3, 2018

class B {
  constructor() {
    /** @type {number} */
    this.foo = 1;
  }
}

class C extends B {
  constructor() {
    super();
  }

  f() {
    this.foo = 2;
  }
}

is migrated to

class B {
  foo: number = 1;
}

class C extends B {
  foo: any; // Wrong

  constructor() {
    super();
  }

  f() {
    this.foo = 2;
  }
}
@bowenni bowenni added the gents label Jan 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant