mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 10:48:32 +00:00
Experiment: allow functions to be redefined (same signature)
This commit is contained in:
parent
a1399656c9
commit
b19177cd6d
1 changed files with 3 additions and 4 deletions
|
@ -7203,10 +7203,9 @@ impl<'db> FunctionType<'db> {
|
|||
// However, our representation of a function literal includes any specialization that
|
||||
// should be applied to the signature. Different specializations of the same function
|
||||
// literal are only assignable to each other if they result in assignable signatures.
|
||||
self.body_scope(db) == other.body_scope(db)
|
||||
&& self
|
||||
.into_callable_type(db)
|
||||
.is_assignable_to(db, other.into_callable_type(db))
|
||||
|
||||
self.into_callable_type(db)
|
||||
.is_assignable_to(db, other.into_callable_type(db))
|
||||
}
|
||||
|
||||
fn is_equivalent_to(self, db: &'db dyn Db, other: Self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue