Skip to content

🤖 User test baselines have changed for instanceof-narrowing #8

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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions src/compiler/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17732,15 +17732,10 @@ namespace ts {
return assignableType;
}
}
// If the candidate type is a subtype of the target type, narrow to the candidate type.
// Otherwise, if the target type is assignable to the candidate type, keep the target type.
// Otherwise, if the candidate type is assignable to the target type, narrow to the candidate
// type. Otherwise, the types are completely unrelated, so narrow to an intersection of the
// two types.
return isTypeSubtypeOf(candidate, type) ? candidate :
isTypeAssignableTo(type, candidate) ? type :
isTypeAssignableTo(candidate, type) ? candidate :
getIntersectionType([type, candidate]);
// If the candidate type is a subtype of the target type, narrow to the candidate type,
// if the target type is a subtype of the candidate type, narrow to the target type,
// otherwise, narrow to an intersection of the two types.
return isTypeSubtypeOf(candidate, type) ? candidate : isTypeSubtypeOf(type, candidate) ? type : getIntersectionType([type, candidate]);
}

function narrowTypeByTypePredicate(type: Type, callExpression: CallExpression, assumeTrue: boolean): Type {
Expand Down
130 changes: 39 additions & 91 deletions tests/baselines/reference/docker/azure-sdk.log
Original file line number Diff line number Diff line change
Expand Up @@ -2,140 +2,88 @@ Exit Code: 1
Standard output:

Rush Multi-Project Build Tool 5.X.X - https://rushjs.io
Node.js version is 12.10.0 (pre-LTS)
Node.js version is 12.13.0 (LTS)
Starting "rush rebuild"
Executing a maximum of ?simultaneous processes...
XX of XX: [@azure/abort-controller] completed successfully in ? seconds
XX of XX: [@azure/core-auth] completed successfully in ? seconds
XX of XX: [@azure/core-tracing] completed successfully in ? seconds
XX of XX: [@azure/core-auth] completed successfully in ? seconds
XX of XX: [@azure/logger] completed successfully in ? seconds
XX of XX: [@azure/core-http] completed successfully in ? seconds
XX of XX: [@azure/identity] completed successfully in ? seconds
XX of XX: [@azure/core-amqp] completed successfully in ? seconds
XX of XX: [@azure/core-arm] completed successfully in ? seconds
XX of XX: [@azure/core-paging] completed successfully in ? seconds
XX of XX: [@azure/identity] completed successfully in ? seconds
XX of XX: [@azure/core-lro] completed successfully in ? seconds
XX of XX: [@azure/test-utils-recorder] completed successfully in ? seconds
XX of XX: [@azure/event-hubs] completed successfully in ? seconds
XX of XX: [@azure/core-amqp] completed successfully in ? seconds
XX of XX: [@azure/event-processor-host] completed successfully in ? seconds
XX of XX: [@azure/keyvault-keys] completed successfully in ? seconds
XX of XX: [@azure/keyvault-secrets] completed successfully in ? seconds
Warning: You have changed the public API signature for this project. Updating review/keyvault-keys.api.md
Warning: You have changed the public API signature for this project. Updating review/keyvault-secrets.api.md
XX of XX: [@azure/abort-controller] completed successfully in ? seconds
XX of XX: [@azure/app-configuration] completed successfully in ? seconds
XX of XX: [@azure/core-asynciterator-polyfill] completed successfully in ? seconds
XX of XX: [@azure/core-paging] completed successfully in ? seconds
Warning: You have changed the public API signature for this project. Updating review/cosmos.api.md
dist-esm/index.js → dist/index.js...
(!) Unresolved dependencies
https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency
tslib (imported by dist-esm/auth.js, dist-esm/queryIterator.js, dist-esm/CosmosClient.js, dist-esm/plugins/Plugin.js, dist-esm/ClientContext.js, dist-esm/globalEndpointManager.js, dist-esm/client/Conflict/Conflict.js, dist-esm/client/Container/Container.js, dist-esm/client/Container/Containers.js, dist-esm/client/Database/Database.js, dist-esm/client/Database/Databases.js, dist-esm/client/Item/Item.js, dist-esm/client/Item/Items.js, dist-esm/client/Offer/Offer.js, dist-esm/client/Permission/Permission.js, dist-esm/client/Permission/Permissions.js, dist-esm/client/StoredProcedure/StoredProcedure.js, dist-esm/client/StoredProcedure/StoredProcedures.js, dist-esm/client/Trigger/Trigger.js, dist-esm/client/Trigger/Triggers.js, dist-esm/client/User/User.js, dist-esm/client/User/Users.js, dist-esm/client/UserDefinedFunction/UserDefinedFunction.js, dist-esm/client/UserDefinedFunction/UserDefinedFunctions.js, dist-esm/queryExecutionContext/defaultQueryExecutionContext.js, dist-esm/queryExecutionContext/documentProducer.js, dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js, dist-esm/queryExecutionContext/pipelinedQueryExecutionContext.js, dist-esm/request/request.js, dist-esm/request/RequestHandler.js, dist-esm/ChangeFeedIterator.js, dist-esm/routing/smartRoutingMapProvider.js, dist-esm/queryExecutionContext/EndpointComponent/AggregateEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js, dist-esm/retry/retryUtility.js, dist-esm/routing/partitionKeyRangeCache.js, dist-esm/retry/defaultRetryPolicy.js, dist-esm/retry/endpointDiscoveryRetryPolicy.js, dist-esm/retry/resourceThrottleRetryPolicy.js, dist-esm/retry/sessionRetryPolicy.js)
@azure/cosmos-sign (imported by dist-esm/auth.js)
universal-user-agent (imported by dist-esm/common/platform.js)
uuid/v4 (imported by dist-esm/ClientContext.js, dist-esm/client/Item/Items.js)
binary-search-bounds (imported by dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js, dist-esm/routing/inMemoryCollectionRoutingMap.js)
priorityqueuejs (imported by dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js)
semaphore (imported by dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js)
debug (imported by dist-esm/common/logger.js)
node-abort-controller (imported by dist-esm/request/RequestHandler.js)
node-fetch (imported by dist-esm/request/RequestHandler.js)
atob (imported by dist-esm/session/sessionContainer.js)
crypto-hash (imported by dist-esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js)
fast-json-stable-stringify (imported by dist-esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js)
(!) Missing global variable names
Use output.globals to specify browser global variable names corresponding to external modules
universal-user-agent (guessing 'userAgent')
tslib (guessing 'tslib')
@azure/cosmos-sign (guessing 'cosmosSign')
debug (guessing 'debugLib')
binary-search-bounds (guessing 'bs')
priorityqueuejs (guessing 'PriorityQueue')
semaphore (guessing 'semaphore')
crypto-hash (guessing 'cryptoHash')
fast-json-stable-stringify (guessing 'stableStringify')
uuid/v4 (guessing 'uuid')
node-abort-controller (guessing 'AbortController')
node-fetch (guessing 'fetch')
atob (guessing 'atob')
(!) Circular dependency: dist-esm/queryExecutionContext/index.js -> dist-esm/queryExecutionContext/headerUtils.js -> dist-esm/queryMetrics/index.js -> dist-esm/queryMetrics/clientSideMetrics.js -> dist-esm/queryExecutionContext/index.js
(!) Circular dependency: dist-esm/index.js -> dist-esm/CosmosClient.js -> dist-esm/client/Database/index.js -> dist-esm/client/Database/Database.js -> dist-esm/client/Container/index.js -> dist-esm/client/Container/Container.js -> dist-esm/client/Script/Scripts.js -> dist-esm/index.js
(!) Circular dependency: dist-esm/request/RequestHandler.js -> dist-esm/retry/retryUtility.js -> dist-esm/request/RequestHandler.js
created dist/index.js in ?s
Warning: You have changed the public API signature for this project. Updating review/event-hubs.api.md
XX of XX: [@azure/eventhubs-checkpointstore-blob] completed successfully in ? seconds
XX of XX: [@azure/keyvault-certificates] completed successfully in ? seconds
Warning: You have changed the public API signature for this project. Updating review/keyvault-certificates.api.md
Warning: You have changed the public API signature for this project. Updating review/service-bus.api.md
XX of XX: [@azure/storage-blob] completed successfully in ? seconds
XX of XX: [@azure/storage-file] completed successfully in ? seconds
Warning: You have changed the public API signature for this project. Updating review/storage-blob.api.md
XX of XX: [@azure/storage-file-share] completed successfully in ? seconds
XX of XX: [@azure/storage-queue] completed successfully in ? seconds
XX of XX: [@azure/template] completed successfully in ? seconds
XX of XX: [testhub] completed successfully in ? seconds
SUCCESS (22)
SUCCESS (19)
================================
@azure/abort-controller (? seconds)
@azure/core-auth (? seconds)
@azure/core-tracing (? seconds)
@azure/core-auth (? seconds)
@azure/logger (? seconds)
@azure/core-http (? seconds)
@azure/identity (? seconds)
@azure/core-amqp (? seconds)
@azure/core-arm (? seconds)
@azure/core-paging (? seconds)
@azure/identity (? seconds)
@azure/core-lro (? seconds)
@azure/test-utils-recorder (? seconds)
@azure/event-hubs (? seconds)
@azure/core-amqp (? seconds)
@azure/event-processor-host (? seconds)
@azure/keyvault-keys (? seconds)
@azure/keyvault-secrets (? seconds)
@azure/abort-controller (? seconds)
@azure/app-configuration (? seconds)
@azure/core-asynciterator-polyfill (? seconds)
@azure/core-paging (? seconds)
@azure/eventhubs-checkpointstore-blob (? seconds)
@azure/keyvault-certificates (? seconds)
@azure/storage-blob (? seconds)
@azure/storage-file (? seconds)
@azure/storage-file-share (? seconds)
@azure/storage-queue (? seconds)
@azure/template (? seconds)
testhub (? seconds)
================================
SUCCESS WITH WARNINGS (2)
SUCCESS WITH WARNINGS (7)
================================
@azure/keyvault-keys (? seconds)
Warning: You have changed the public API signature for this project. Updating review/keyvault-keys.api.md
@azure/keyvault-secrets (? seconds)
Warning: You have changed the public API signature for this project. Updating review/keyvault-secrets.api.md
@azure/cosmos (? seconds)
Warning: You have changed the public API signature for this project. Updating review/cosmos.api.md
dist-esm/index.js → dist/index.js...
(!) Unresolved dependencies
https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency
tslib (imported by dist-esm/auth.js, dist-esm/queryIterator.js, dist-esm/CosmosClient.js, dist-esm/plugins/Plugin.js, dist-esm/ClientContext.js, dist-esm/globalEndpointManager.js, dist-esm/client/Conflict/Conflict.js, dist-esm/client/Container/Container.js, dist-esm/client/Container/Containers.js, dist-esm/client/Database/Database.js, dist-esm/client/Database/Databases.js, dist-esm/client/Item/Item.js, dist-esm/client/Item/Items.js, dist-esm/client/Offer/Offer.js, dist-esm/client/Permission/Permission.js, dist-esm/client/Permission/Permissions.js, dist-esm/client/StoredProcedure/StoredProcedure.js, dist-esm/client/StoredProcedure/StoredProcedures.js, dist-esm/client/Trigger/Trigger.js, dist-esm/client/Trigger/Triggers.js, dist-esm/client/User/User.js, dist-esm/client/User/Users.js, dist-esm/client/UserDefinedFunction/UserDefinedFunction.js, dist-esm/client/UserDefinedFunction/UserDefinedFunctions.js, dist-esm/queryExecutionContext/defaultQueryExecutionContext.js, dist-esm/queryExecutionContext/documentProducer.js, dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js, dist-esm/queryExecutionContext/pipelinedQueryExecutionContext.js, dist-esm/request/request.js, dist-esm/request/RequestHandler.js, dist-esm/ChangeFeedIterator.js, dist-esm/routing/smartRoutingMapProvider.js, dist-esm/queryExecutionContext/EndpointComponent/AggregateEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OffsetLimitEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderByEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js, dist-esm/retry/retryUtility.js, dist-esm/routing/partitionKeyRangeCache.js, dist-esm/retry/defaultRetryPolicy.js, dist-esm/retry/endpointDiscoveryRetryPolicy.js, dist-esm/retry/resourceThrottleRetryPolicy.js, dist-esm/retry/sessionRetryPolicy.js)
@azure/cosmos-sign (imported by dist-esm/auth.js)
universal-user-agent (imported by dist-esm/common/platform.js)
uuid/v4 (imported by dist-esm/ClientContext.js, dist-esm/client/Item/Items.js)
binary-search-bounds (imported by dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js, dist-esm/routing/inMemoryCollectionRoutingMap.js)
priorityqueuejs (imported by dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js)
semaphore (imported by dist-esm/queryExecutionContext/parallelQueryExecutionContextBase.js)
debug (imported by dist-esm/common/logger.js)
node-abort-controller (imported by dist-esm/request/RequestHandler.js)
node-fetch (imported by dist-esm/request/RequestHandler.js)
atob (imported by dist-esm/session/sessionContainer.js)
crypto-hash (imported by dist-esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js)
fast-json-stable-stringify (imported by dist-esm/queryExecutionContext/EndpointComponent/OrderedDistinctEndpointComponent.js, dist-esm/queryExecutionContext/EndpointComponent/UnorderedDistinctEndpointComponent.js)
(!) Missing global variable names
Use output.globals to specify browser global variable names corresponding to external modules
universal-user-agent (guessing 'userAgent')
tslib (guessing 'tslib')
@azure/cosmos-sign (guessing 'cosmosSign')
debug (guessing 'debugLib')
binary-search-bounds (guessing 'bs')
priorityqueuejs (guessing 'PriorityQueue')
semaphore (guessing 'semaphore')
crypto-hash (guessing 'cryptoHash')
fast-json-stable-stringify (guessing 'stableStringify')
uuid/v4 (guessing 'uuid')
node-abort-controller (guessing 'AbortController')
node-fetch (guessing 'fetch')
atob (guessing 'atob')
(!) Circular dependency: dist-esm/queryExecutionContext/index.js -> dist-esm/queryExecutionContext/headerUtils.js -> dist-esm/queryMetrics/index.js -> dist-esm/queryMetrics/clientSideMetrics.js -> dist-esm/queryExecutionContext/index.js
(!) Circular dependency: dist-esm/index.js -> dist-esm/CosmosClient.js -> dist-esm/client/Database/index.js -> dist-esm/client/Database/Database.js -> dist-esm/client/Container/index.js -> dist-esm/client/Container/Container.js -> dist-esm/client/Script/Scripts.js -> dist-esm/index.js
(!) Circular dependency: dist-esm/request/RequestHandler.js -> dist-esm/retry/retryUtility.js -> dist-esm/request/RequestHandler.js
created dist/index.js in ?s
@azure/event-hubs (? seconds)
Warning: You have changed the public API signature for this project. Updating review/event-hubs.api.md
@azure/keyvault-certificates (? seconds)
Warning: You have changed the public API signature for this project. Updating review/keyvault-certificates.api.md
@azure/service-bus (? seconds)
Warning: You have changed the public API signature for this project. Updating review/service-bus.api.md
@azure/storage-blob (? seconds)
Warning: You have changed the public API signature for this project. Updating review/storage-blob.api.md
================================
rush rebuild ( ? seconds)



Standard error:
XX of XX: [@azure/keyvault-keys] completed with warnings in ? seconds
XX of XX: [@azure/keyvault-secrets] completed with warnings in ? seconds
XX of XX: [@azure/cosmos] completed with warnings in ? seconds
XX of XX: [@azure/event-hubs] completed with warnings in ? seconds
XX of XX: [@azure/keyvault-certificates] completed with warnings in ? seconds
XX of XX: [@azure/service-bus] completed with warnings in ? seconds
XX of XX: [@azure/storage-blob] completed with warnings in ? seconds
Project(s) succeeded with warnings
Loading