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

Remove most special treatment of specialized signatures. #6278

Merged
merged 14 commits into from
Feb 2, 2016

Conversation

DanielRosenwasser
Copy link
Member

Fixes #5659, #6276, and resolves the main issues in #6143

With this change, the only thing that makes a specialized overload "special" is that we will still bubble those signatures to the top for overload resolution. This is done in reorderCandidates.

Specifically, here is the new behavior:

  • A specialized overload no longer needs to be assignable to one of its overloads. (thanks to Implement new overload compatibility checking #6075).
  • A specialized overload must now be compatible with an implementation signature if one exists, in the same manner that all other overloads must be compatible.
  • Specialized overloads are now considered in relation checks, whereas before, they were entirely ignored.

Edit on 2016-01-29: Fixes #6732.

@DanielRosenwasser
Copy link
Member Author

@ahejlsberg @RyanCavanaugh could you guys take a look at this PR?

Conflicts:
	src/compiler/checker.ts
@ahejlsberg
Copy link
Member

#6732 convinces me we need to get rid of the special treatment. So I'm good with merging this (once you fix the failed integration checks).

@DanielRosenwasser
Copy link
Member Author

@ahejlsberg are we going to port this into 1.8 as well?

DanielRosenwasser added a commit that referenced this pull request Feb 2, 2016
Remove most special treatment of specialized signatures.
@DanielRosenwasser DanielRosenwasser merged commit 3dae253 into master Feb 2, 2016
@DanielRosenwasser DanielRosenwasser deleted the theyreNotTHATSpecial branch February 2, 2016 20:45
@DanielRosenwasser DanielRosenwasser added the Domain: Literal Types Unit types including string literal types, numeric literal types, Boolean literals, null, undefined label Apr 9, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Domain: Literal Types Unit types including string literal types, numeric literal types, Boolean literals, null, undefined
Projects
None yet
3 participants