mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-22 22:44:47 +03:00
commit
7ac50d83ed
@ -84,7 +84,7 @@ impl SourceMap {
|
||||
Some(LineCol { source_file, line, col })
|
||||
}
|
||||
|
||||
/// Retrives the location (source file, line, col) on the given span.
|
||||
/// Retrieves the location (source file, line, col) on the given span.
|
||||
pub fn span_to_location(&self, sp: Span) -> Option<SpanLocation> {
|
||||
let lo = self.find_line_col(sp.lo)?;
|
||||
let hi = self.find_line_col(sp.hi)?;
|
||||
|
@ -31,10 +31,10 @@ pub use self::macros::*;
|
||||
pub mod traits;
|
||||
pub use self::traits::*;
|
||||
|
||||
// Right now for cleanliness of calling error functions we say each argument implments one of the follow types rather than giving a specific type.
|
||||
// Right now for cleanliness of calling error functions we say each argument implements one of the follow types rather than giving a specific type.
|
||||
// This allows us to just pass many types rather doing conversions cleaning up the code.
|
||||
// The args can be made cleaneronce https://github.com/rust-lang/rust/issues/41517 or https://github.com/rust-lang/rust/issues/63063 hits stable.
|
||||
// Either of why would allows to generate a type alias for these trait implmenting types.
|
||||
// Either of why would allows to generate a type alias for these trait implementing types.
|
||||
// pub(crate) type DisplayArg = impl std::fmt::Display;
|
||||
// pub(crate) type DebugArg = impl std::fmt::Debug;
|
||||
// pub(crate) type ErrorArg = impl std::error::Error;
|
||||
|
@ -28,5 +28,5 @@ the low 16 bits are zero and counts zero otherwise. Then `b3` uses a mask `y &
|
||||
otherwise. The masks for `b2`, `b1`, and `b0` can count four, two, and
|
||||
one 0-bits similarly.
|
||||
|
||||
The varables `bz, b4, .., b0` are all independent, and their values are added up
|
||||
The variables `bz, b4, .., b0` are all independent, and their values are added up
|
||||
for the result.
|
||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
||||
*/
|
||||
|
||||
program test.aleo {
|
||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
||||
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||
|
||||
transition main(y: bool) -> i128 {
|
||||
let a: i128 = -170141183460469231731687303715884105727i128;
|
||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
||||
*/
|
||||
|
||||
program test.aleo {
|
||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
||||
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||
|
||||
transition main(y: bool) -> i128 {
|
||||
let a: i128 = -170141183460469231731687303715884105728i128;
|
||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
||||
*/
|
||||
|
||||
program test.aleo {
|
||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
||||
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||
|
||||
transition main(y: bool) -> i16 {
|
||||
let a: i16 = -32767i16;
|
||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
||||
*/
|
||||
|
||||
program test.aleo {
|
||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
||||
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||
|
||||
transition main(y: bool) -> i16 {
|
||||
let a: i16 = -32768i16;
|
||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
||||
*/
|
||||
|
||||
program test.aleo {
|
||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
||||
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||
|
||||
transition main(y: bool) -> i32 {
|
||||
let a: i32 = -2147483647i32;
|
||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
||||
*/
|
||||
|
||||
program test.aleo {
|
||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
||||
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||
|
||||
transition main(y: bool) -> i32 {
|
||||
let a: i32 = -2147483648i32;
|
||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
||||
*/
|
||||
|
||||
program test.aleo {
|
||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
||||
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||
|
||||
transition main(y: bool) -> i64 {
|
||||
let a: i64 = -9223372036854775807i64;
|
||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
||||
*/
|
||||
|
||||
program test.aleo {
|
||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
||||
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||
|
||||
transition main(y: bool) -> i64 {
|
||||
let a: i64 = -9223372036854775808i64;
|
||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
||||
*/
|
||||
|
||||
program test.aleo {
|
||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
||||
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||
|
||||
transition main(y: bool) -> i8 {
|
||||
let a: i8 = -127i8;
|
||||
|
@ -4,7 +4,7 @@ expectation: Pass
|
||||
*/
|
||||
|
||||
program test.aleo {
|
||||
// TODO: This test passes, but constant propogation should detect an overflow.
|
||||
// TODO: This test passes, but constant propagation should detect an overflow.
|
||||
|
||||
transition main(y: bool) -> i8 {
|
||||
let a: i8 = -128i8;
|
||||
|
Loading…
Reference in New Issue
Block a user