Skip to content

Remove most special treatment of specialized signatures.#6278

Merged
DanielRosenwasser merged 14 commits into
masterfrom
theyreNotTHATSpecial
Feb 2, 2016
Merged

Remove most special treatment of specialized signatures.#6278
DanielRosenwasser merged 14 commits into
masterfrom
theyreNotTHATSpecial

Conversation

@DanielRosenwasser
Copy link
Copy Markdown
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
Copy Markdown
Member Author

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

Conflicts:
	src/compiler/checker.ts
@ahejlsberg
Copy link
Copy Markdown
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
Copy Markdown
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