[ty] Set flag to avoid type[T@f] being inserted when you double-click on the inlay (#22139)

This commit is contained in:
Matthew Mckee
2025-12-22 14:00:45 +00:00
committed by GitHub
parent 884e83591e
commit a46835c224
2 changed files with 1 additions and 7 deletions

View File

@@ -711,6 +711,7 @@ impl<'db> FmtDetailed<'db> for DisplayRepresentation<'db> {
f.write_char(']')
}
SubclassOfInner::TypeVar(bound_typevar) => {
f.set_invalid_syntax();
f.with_type(KnownClass::Type.to_class_literal(self.db))
.write_str("type")?;
f.write_char('[')?;