Merge pull request #85487 from swiftlang/jepa-main4

AST: Properly disallow isa/cast/dyn_cast on `Type`
This commit is contained in:
Anthony Latsis
2025-11-18 07:35:46 +00:00
committed by GitHub
11 changed files with 48 additions and 35 deletions

View File

@@ -9972,7 +9972,7 @@ ConstraintSystem::matchPackElementType(Type elementType, Type patternType,
return tryFix([&]() {
auto envShape = genericEnv->mapTypeIntoEnvironment(
genericEnv->getOpenedElementShapeClass());
if (auto *pack = dyn_cast<PackType>(envShape))
if (auto *pack = dyn_cast<PackType>(envShape.getPointer()))
envShape = pack->unwrapSingletonPackExpansion()->getPatternType();
return SkipSameShapeRequirement::create(