Skip to content

Commit

Permalink
bug in constant handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mbellotti committed Mar 5, 2023
1 parent d2c6092 commit 97a8008
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion smt/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1241,8 +1241,8 @@ func (g *Generator) constantRule(id string, c constant.Constant) string {
switch val := c.(type) {
case *constant.Float:
ty := g.variables.LookupType(id, val)
g.addVarToRound(id, 0)
id = g.variables.AdvanceSSA(id)
g.addVarToRound(id, int(g.variables.SSA[id]))
if g.isASolvable(id) {
g.declareVar(id, ty)
} else {
Expand Down
4 changes: 4 additions & 0 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,10 @@ func IsNumeric(t *ast.Type) bool {
return true
case "FLOAT":
return true
case "UNKNOWN":
return true
case "UNCERTAIN":
return true
}
return false
}
Expand Down

0 comments on commit 97a8008

Please sign in to comment.