Merge pull request #75518 from Azoy/integer-generics

Implement Value generics
This commit is contained in:
Alejandro Alonso
2024-09-05 15:33:46 -07:00
committed by GitHub
185 changed files with 4297 additions and 798 deletions

View File

@@ -7535,6 +7535,14 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
case TypeKind::ErrorUnion:
break;
case TypeKind::Integer:
if (shouldAttemptFixes())
break;
// If we're asking if two integer types are the same, then we know they
// aren't.
return getTypeMatchFailure(locator);
}
}
@@ -7684,7 +7692,7 @@ ConstraintSystem::matchTypes(Type type1, Type type2, ConstraintKind kind,
}
}
}
if (kind == ConstraintKind::BindToPointerType) {
if (desugar2->isEqual(getASTContext().TheEmptyTupleType))
return getTypeMatchSuccess();
@@ -8211,6 +8219,10 @@ ConstraintSystem::simplifyConstructionConstraint(
return SolutionKind::Error;
}
case TypeKind::Integer: {
llvm_unreachable("implement me");
}
}
auto fnLocator = getConstraintLocator(locator,