forked from dafny-lang/dafny
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Type conversions from unsigned Java types (dafny-lang#4384)
Fixes dafny-lang#4152.
- Loading branch information
1 parent
09e1ad2
commit d8cd09f
Showing
6 changed files
with
52 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// RUN: %testDafnyForEachCompiler "%s" | ||
|
||
method Main() { | ||
var a: bv8 := 0xFF; | ||
var b: bv16 := 0xFFFF; | ||
var c: bv32 := 0xFFFF_FFFF; | ||
var d: bv64 := 0xFFFF_FFFF_FFFF_FFFF; | ||
var e: bv128 := 0xFFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF_FFFF; | ||
print a as real, " ", b as real, " ", c as real, " ", d as real , " ", e as real, "\n"; | ||
print a as nat, " ", b as nat, " ", c as nat, " ", d as nat, " ", e as nat, "\n"; | ||
print a as ORDINAL, " ", b as ORDINAL, " ", c as ORDINAL, " ", d as ORDINAL, " ", e as ORDINAL, "\n"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
255.0 65535.0 4294967295.0 18446744073709551615.0 340282366920938463463374607431768211455.0 | ||
255 65535 4294967295 18446744073709551615 340282366920938463463374607431768211455 | ||
255 65535 4294967295 18446744073709551615 340282366920938463463374607431768211455 |