SERVER-134937ClosedFixed

Implement InternalSchemaTypeExpression narrowing

Implement narrowType for InternalSchemaTypeExpression. It carries the same MatcherTypeSet as $type, but uses ElementPath with LeafArrayBehavior::kNoTraversal and NonLeafArrayBehavior::kTraverse. The expression is generated from $jsonSchema but we can test it directly too. {x: \{$_internalSchemaType: number}} with x = any -> x is number {x: \{$not: {$_internalSchemaType: number}}} with x = any -> x is any except number {x: \{$_internalSchemaType: [number, string]}} with x = any -> x is nu

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc1025
Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.