-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95781cf
commit beebbbb
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
third_party/move/move-prover/tests/sources/functional/bug_10784.move
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,26 @@ | ||
module 0x42::m { | ||
|
||
struct RistrettoPoint has drop { | ||
handle: u64 | ||
} | ||
|
||
struct CompressedRistretto has copy, store, drop { | ||
data: vector<u8> | ||
} | ||
|
||
native fun point_compress_internal(point: &RistrettoPoint): vector<u8>; | ||
|
||
spec fun spec_point_compress_internal(point: &RistrettoPoint): vector<u8>; | ||
|
||
spec point_compress_internal(point: &RistrettoPoint): vector<u8> { | ||
pragma opaque; | ||
ensures result == spec_point_compress_internal(point); | ||
} | ||
|
||
public fun point_compress(point: &RistrettoPoint): CompressedRistretto { | ||
CompressedRistretto { | ||
data: point_compress_internal(point) | ||
} | ||
} | ||
|
||
} |