Skip to content

Conversation

@ahejlsberg
Copy link
Member

Fixes #32349.

@ahejlsberg
Copy link
Member Author

@typescript-bot run dt
@typescript-bot test this

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 13, 2019

Heya @ahejlsberg, I've started to run the parallelized Definitely Typed test suite on this PR at 6f637b0. You can monitor the build here. It should now contribute to this PR's status checks.

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 13, 2019

Heya @ahejlsberg, I've started to run the extended test suite on this PR at 6f637b0. You can monitor the build here. It should now contribute to this PR's status checks.

@ahejlsberg
Copy link
Member Author

DT test failures look like preexisting conditions unrelated to this PR.

RWC tests have one failure that boils down to this:

declare function foo<T>(x: T | Promise<T>): void;
declare let b: false | Promise<true>;
foo(b);  // Error

We fail to infer boolean for T, instead inferring just true. The issue is the way we give lower priority to direct inferences to naked type parameters in unions. I will think about ways to fix this.

@ahejlsberg
Copy link
Member Author

Verified that there are no differences in RWC tests between this and the master branch.

@ahejlsberg
Copy link
Member Author

So, now that #32460 is in and RWC is clean, I'm going to merge this.

@ahejlsberg ahejlsberg merged commit 34dd4b8 into master Jul 24, 2019
@ahejlsberg ahejlsberg deleted the fix32349 branch July 24, 2019 00:33
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inconsistent type inference for cases of one and multiple values

3 participants