Skip to content

Instantly share code, notes, and snippets.

@ORESoftware
Last active November 25, 2017 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ORESoftware/66b72b4b85262d957cb03ad097e4743e to your computer and use it in GitHub Desktop.
Save ORESoftware/66b72b4b85262d957cb03ad097e4743e to your computer and use it in GitHub Desktop.
Need to make this compile
class A {
foo(): A {
return this;
}
}
class B extends A {
bar(): B {
return this;
}
}
new B().foo().bar(); // does not compile
@ORESoftware
Copy link
Author

this will not compile, but will work at runtime

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment