From 316c1b21e29f553c28533216221fd679258bf67d Mon Sep 17 00:00:00 2001 From: Alex Waygood Date: Tue, 1 Jul 2025 17:57:52 +0100 Subject: [PATCH] [ty] Add some missing calls to `normalized_impl` (#19074) ## Summary I hoped this might fix the latest stack overflows on https://github.com/astral-sh/ruff/pull/18659... it doesn't look like it does, but these changes seem like they're probably correct anyway...? ## Test Plan --- crates/ty_python_semantic/src/types/generics.rs | 3 ++- crates/ty_python_semantic/src/types/tuple.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/ty_python_semantic/src/types/generics.rs b/crates/ty_python_semantic/src/types/generics.rs index 7b686e6b03..356fc64a22 100644 --- a/crates/ty_python_semantic/src/types/generics.rs +++ b/crates/ty_python_semantic/src/types/generics.rs @@ -385,7 +385,8 @@ impl<'db> Specialization<'db> { let tuple_inner = self .tuple_inner(db) .and_then(|tuple| tuple.normalized_impl(db, visitor)); - Self::new(db, self.generic_context(db), types, tuple_inner) + let context = self.generic_context(db).normalized_impl(db, visitor); + Self::new(db, context, types, tuple_inner) } pub(super) fn materialize(self, db: &'db dyn Db, variance: TypeVarVariance) -> Self { diff --git a/crates/ty_python_semantic/src/types/tuple.rs b/crates/ty_python_semantic/src/types/tuple.rs index b38aab2af0..aa3b0e56d6 100644 --- a/crates/ty_python_semantic/src/types/tuple.rs +++ b/crates/ty_python_semantic/src/types/tuple.rs @@ -654,7 +654,8 @@ impl<'db> VariableLengthTuple> { .prenormalized_suffix_elements(db, None) .map(|ty| ty.normalized_impl(db, visitor)) .collect::>(); - Self::mixed(prefix, self.variable.normalized(db), suffix) + let variable = self.variable.normalized_impl(db, visitor); + Self::mixed(prefix, variable, suffix) } fn materialize(&self, db: &'db dyn Db, variance: TypeVarVariance) -> TupleSpec<'db> {