Skip to content

Commit

Permalink
fix: more accurate nbAddKt function
Browse files Browse the repository at this point in the history
  • Loading branch information
jefremof committed Aug 13, 2024
1 parent d4ab7a6 commit 3c58a20
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,14 @@ fun nbAddKt(
context.ctx
) {
context.curState ?: return
/*
The __add__ method corresponds both to the nb_add and sq_concat slots,
so it is crucial not to assert the presence of nb_add, but to fork on these
two possible options.
*/

Check warning

Code scanning / detekt

Detect the alignment of the initial star in a block comment. Warning

Initial star should align with start of block comment
val nbAdd = left.evalIsSoft(context, HasNbAdd) or right.evalIsSoft(context, HasNbAdd)
val sqConcat = left.evalIsSoft(context, HasSqConcat) and right.evalIsSoft(context, HasSqConcat)
pyAssert(context, context.ctx.mkImplies(nbAdd.not(), sqConcat))
pyAssert(context, nbAdd.not() implies sqConcat)
pyFork(context, nbAdd)
}

Expand Down

0 comments on commit 3c58a20

Please sign in to comment.