← 返回事件
持续讨论AI发版

trunk/c9c53665f67242a8a30caaa42b375e590b99009a: Fix z3 model value comparisons in test_z3_gradual_types (#197424)

发生了什么

z3's Solver.model()[const].arg(i).arg(j) returns an ArithRef (e.g. IntNumRef), not a Python int. Comparing an ArithRef to a Python int with != produces a z3 BoolRef, which is always truthy in a Python if , so every if ... != expected: raise AssertionError guard fired unconditionally and the cases failed spuriously even when the solver produced the correct value. Convert z3 numerics to Python ints with .as_long() bef…

摘要按规则整理自下方来源原文

为什么在扩散

来源