Skip to content

Use of named constants in contracts with bit_vector solver #1858

@rod-chapman

Description

@rod-chapman

It appears that named constants do not work in contracts when the bit_vector solver is specified.
For example, I have

const Q         : i32 = 3329;

then

assert(3329 >> 1 == 1664) by (bit_vector);

works fine, but

assert(Q >> 1 == 1664) by (bit_vector);

is rejected with

error: unsupported for bit-vector: expression conversion Call(Fun(Fun(Path(Some("lib"), ["Q"])), None), [], [])
   --> src/lib.rs:335:10
    |
335 |   assert(Q >> 1 == 1664) by (bit_vector);
    |          ^

Can this usage be supported please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions