3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-17 06:11:44 +00:00

Address code review feedback: use os.CreateTemp and remove unused vars

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-02-16 21:47:33 +00:00
parent 6d3c41143c
commit c99baf45d0
2 changed files with 23 additions and 23 deletions

View file

@ -89,10 +89,8 @@ func main() {
solver.Reset()
intSort := ctx.MkIntSort()
listSort, nilDecl, consDecl, isNilDecl, isConsDecl, headDecl, tailDecl :=
listSort, nilDecl, consDecl, _, _, headDecl, _ :=
ctx.MkListSort("IntList", intSort)
// Silence unused warnings (these constructors may be needed in more complex examples)
_, _, _ = isNilDecl, isConsDecl, tailDecl
// Create list: cons(1, cons(2, nil))
nilList := ctx.MkApp(nilDecl)
@ -138,16 +136,12 @@ func main() {
fmt.Println("\nExample 6: Enumeration types")
solver.Reset()
colorSort, colorConsts, colorTesters := ctx.MkEnumSort(
colorSort, colorConsts, _ := ctx.MkEnumSort(
"Color",
[]string{"Red", "Green", "Blue"},
)
_ = colorTesters // Silence unused warning
red := ctx.MkApp(colorConsts[0])
green := ctx.MkApp(colorConsts[1])
blue := ctx.MkApp(colorConsts[2])
_, _ = green, blue // Silence unused warning
c1 := ctx.MkConst(ctx.MkStringSymbol("c1"), colorSort)
c2 := ctx.MkConst(ctx.MkStringSymbol("c2"), colorSort)