Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions pyrefly/lib/solver/solver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1549,17 +1549,8 @@ impl<'a, Ans: LookupAnswer> Subset<'a, Ans> {
}
}
Variable::PartialContained => {
// Promote LiteralStr to str when pinning a partial type.
// TODO(stroxler): should we be promoting other literal types here?
// See: https://github.com/facebook/pyrefly/issues/2068
let t2_p = match t2 {
Type::LiteralString(_) => {
self.type_order.stdlib().str().clone().to_type()
}
_ => t2.clone(),
};
drop(v1_ref);
variables.update(*v1, Variable::Answer(t2_p));
variables.update(*v1, Variable::Answer(t2.clone()));
Ok(())
}
Variable::Unwrap | Variable::Recursive => {
Expand Down
Loading