Skip to content

Commit

Permalink
jule: add mutability responsiveness for trait methods
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Dec 28, 2024
1 parent e0c135a commit 10bb1a5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions std/jule/sema/func.jule
Original file line number Diff line number Diff line change
Expand Up @@ -266,12 +266,13 @@ impl FuncIns {
if !p2.Decl.IsSelf() {
ret false
}

if p1.Decl.IsRef() != p2.Decl.IsRef() {
ret false
}

ret true
if responsive {
ret p1.Decl.Mutable || !p2.Decl.Mutable
}
ret p1.Decl.Mutable == p2.Decl.Mutable
}

if responsive {
Expand Down Expand Up @@ -319,7 +320,7 @@ impl FuncIns {
if self.Decl.Ident != other.Decl.Ident {
ret false
}
if !self.EqualFunc(other, false) {
if !self.EqualFunc(other, true) {
ret false
}
if len(self.Decl.Generics) != len(other.Decl.Generics) {
Expand Down

0 comments on commit 10bb1a5

Please sign in to comment.