Skip to content

Commit

Permalink
compiler: fix the != operator equals to the == operator for struct ty…
Browse files Browse the repository at this point in the history
…pes in the object code
  • Loading branch information
mertcandav committed Jan 12, 2025
1 parent b84490f commit efe64e3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/julec/obj/cxx/expr.jule
Original file line number Diff line number Diff line change
Expand Up @@ -2136,6 +2136,9 @@ fn structBinary(mut &buf: strings::Builder, mut &s: &sema::StructIns, &l: str,
if op != token::Id.Eqs && op != token::Id.NotEq {
panic("cxx: unsupported token occurred for structure binary, this is an implementation mistake")
}
if op == token::Id.NotEq {
buf.WriteByte('!')!
}
identCoder.structureIns(buf, s)
buf.WriteStr(structDefaultEqMethodSuffix)!
buf.WriteStr("(&")!
Expand Down

0 comments on commit efe64e3

Please sign in to comment.