mirror of
https://github.com/astral-sh/ruff
synced 2026-01-22 14:00:51 -05:00
[ty] fix hover type on named expression target (#21952)
## Summary What it says on the tin. ## Test Plan Added hover test.
This commit is contained in:
@@ -8164,10 +8164,10 @@ impl<'db, 'ast> TypeInferenceBuilder<'db, 'ast> {
|
||||
value,
|
||||
} = named;
|
||||
|
||||
self.infer_expression(target, TypeContext::default());
|
||||
|
||||
self.add_binding(named.target.as_ref().into(), definition, |builder, tcx| {
|
||||
builder.infer_expression(value, tcx)
|
||||
let ty = builder.infer_expression(value, tcx);
|
||||
builder.store_expression_type(target, ty);
|
||||
ty
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user