You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the behavior in every version I tried, and I did not review the FAQ as this is most probably an oversight.
β― Playground Link
Not applicable
π» Code
The function getRecursionIdentity currently contains the following code:
// The recursion identity of a type is an object identity that is shared among multiple instantiations of the type.// We track recursion identities in order to identify deeply nested and possibly infinite type instantiations with// the same origin. For example, when type parameters are in scope in an object type such as { x: T }, all// instantiations of that type have the same recursion identity. The default recursion identity is the object// identity of the type, meaning that every type is unique. Generally, types with constituents that could circularly// reference the type have a recursion identity that differs from the object identity.functiongetRecursionIdentity(type: Type): object{// Object and array literals are known not to contain recursive references and don't need a recursion identity.if(type.flags&TypeFlags.Object&&!isObjectOrArrayLiteralType(type)){if(getObjectFlags(type)&&ObjectFlags.Reference&&(typeasTypeReference).node){// Deferred type references are tracked through their associated AST node. This gives us finer// granularity than using their associated target because each manifest type reference has a// unique AST node.return(typeasTypeReference).node!;}if(type.symbol&&!(getObjectFlags(type)&ObjectFlags.Anonymous&&type.symbol.flags&SymbolFlags.Class)){// We track all object types that have an associated symbol (representing the origin of the type), but// exclude the static side of classes from this check since it shares its symbol with the instance side.returntype.symbol;}if(isTupleType(type)){returntype.target;}}
π Actual behavior
This code contains a bug in the following if condition:
Bug Report
π Search Terms
π Version & Regression Information
β― Playground Link
Not applicable
π» Code
The function
getRecursionIdentity
currently contains the following code:π Actual behavior
This code contains a bug in the following if condition:
It applies a boolean AND between the
objectFlags
of the type and theObjectFlags.Reference
flag.π Expected behavior
This should be a bitwise AND.
The text was updated successfully, but these errors were encountered: