We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.8.1
function method UInt16ToSeq(x: uint16): (ret: seq<uint8>) { var b0 := (x / 0x100) as uint8; var b1 := (x % 0x100) as uint8; [b0, b1] }
dafny test -t rs --function-syntax 3
Resulting Rust code is pub fn UInt16ToSeq(x: u16) -> Sequence { let mut b0: u8 = (x / truncate!(int!(256), u16)) as u8; let mut b1: u8 = (x % truncate!(int!(256), u16)) as u8; seq![b0, b1] } when it ought to be pub fn UInt16ToSeq(x: u16) -> Sequence { let mut b0: u8 = (x / 256) as u8; let mut b1: u8 = (x % 256) as u8; seq![b0, b1] }
Mac
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Dafny version
4.8.1
Code to produce this issue
Command to run and resulting output
What happened?
Resulting Rust code is
pub fn UInt16ToSeq(x: u16) -> Sequence {
let mut b0: u8 = (x / truncate!(int!(256), u16)) as u8;
let mut b1: u8 = (x % truncate!(int!(256), u16)) as u8;
seq![b0, b1]
}
when it ought to be
pub fn UInt16ToSeq(x: u16) -> Sequence {
let mut b0: u8 = (x / 256) as u8;
let mut b1: u8 = (x % 256) as u8;
seq![b0, b1]
}
What type of operating system are you experiencing the problem on?
Mac
The text was updated successfully, but these errors were encountered: