(x int)
| 26 | const MaxVariables = (1 << 31) - 100 |
| 27 | |
| 28 | func NewVar(x int) Expr { |
| 29 | if x < 0 || x >= MaxVariables { |
| 30 | panic("variable id out of range") |
| 31 | } |
| 32 | v := builder.InternalVariable(uint32(x)) |
| 33 | t := reflect.ValueOf(v).Index(0).Interface().(Expr) |
| 34 | if t.WireID() != x { |
| 35 | panic("variable id mismatch, please check gnark version") |
| 36 | } |
| 37 | return t |
| 38 | } |
no test coverage detected