Skip to content

Commit a168950

Browse files
authored
Remove redundant hasNonCircularBaseConstraint check (#56725)
1 parent 8a3fe57 commit a168950

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22313,7 +22313,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
2231322313
// This is a carve-out in comparability to essentially forbid comparing a type parameter
2231422314
// with another type parameter unless one extends the other. (Remember: comparability is mostly bidirectional!)
2231522315
let constraint = getConstraintOfTypeParameter(source);
22316-
if (constraint && hasNonCircularBaseConstraint(source)) {
22316+
if (constraint) {
2231722317
while (constraint && someType(constraint, c => !!(c.flags & TypeFlags.TypeParameter))) {
2231822318
if (result = isRelatedTo(constraint, target, RecursionFlags.Source, /*reportErrors*/ false)) {
2231922319
return result;

0 commit comments

Comments
 (0)