Skip to content
New issue

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

[Bug] comparing strings during mutation causes strings do not exist on ASG level #1035

Closed
0rphon opened this issue Jun 12, 2021 · 0 comments · Fixed by #1043
Closed

[Bug] comparing strings during mutation causes strings do not exist on ASG level #1035

0rphon opened this issue Jun 12, 2021 · 0 comments · Fixed by #1043
Assignees
Labels
bug Something isn't working priority-high A high priority bug/task in Leo.

Comments

@0rphon
Copy link
Contributor

0rphon commented Jun 12, 2021

🐛 Bug Report

didnt catch this one before because the error message is the same as #1025

Code snippet to reproduce

function main () {
    let x = false;
    x = "test1" == "test2";
}

Stack trace & error message

D:\Work\leo-playground>D:\Work\leo_repos\leo\target\release\leo clean && D:\Work\leo_repos\leo\target\release\leo run
      Done Finished in 0 milliseconds 

     Build Starting...
     Build Compiling main program... ("D:\\Work\\leo-playground\\src/main.leo")
thread 'main' panicked at 'not implemented: strings do not exist on ASG level', asg\src\expression\constant.rs:224:17
stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\std\src\panicking.rs:493
   1: core::panicking::panic_fmt
             at /rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0\/library\core\src\panicking.rs:92
   2: <leo_asg::expression::constant::Constant as leo_asg::node::FromAst<leo_ast::expression::value::ValueExpression>>::from_ast
   3: <&leo_asg::expression::Expression as leo_asg::node::FromAst<leo_ast::expression::Expression>>::from_ast
   4: <leo_asg::expression::binary::BinaryExpression as leo_asg::node::FromAst<leo_ast::expression::binary::BinaryExpression>>::from_ast
   5: <&leo_asg::expression::Expression as leo_asg::node::FromAst<leo_ast::expression::Expression>>::from_ast
   6: leo_asg::statement::assign::<impl leo_asg::node::FromAst<leo_ast::statements::assign::AssignStatement> for &leo_asg::statement::Statement>::from_ast
   7: <&leo_asg::statement::Statement as leo_asg::node::FromAst<leo_ast::statements::statement::Statement>>::from_ast
   8: <leo_asg::statement::block::BlockStatement as leo_asg::node::FromAst<leo_ast::statements::block::Block>>::from_ast
   9: leo_asg::program::function::Function::fill_from_ast
  10: leo_asg::program::Program::new
  11: leo_compiler::compiler::Compiler<F,G>::parse_program
  12: leo_compiler::compiler::Compiler<F,G>::parse_program_with_input
  13: <leo::commands::build::Build as leo::commands::Command>::apply
  14: leo::commands::Command::execute
  15: leo::commands::Command::execute
  16: leo::commands::Command::execute
  17: leo::commands::Command::try_execute
  18: <leo::commands::init::Init as leo::commands::Command>::apply
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Your Environment

  • leo commit c0a4f28
  • rustc version 1.53.0-nightly
  • Windows 10.0.19043 (Windows 10 Pro) [64-bit]
@0rphon 0rphon added bug Something isn't working fuzz-bug labels Jun 12, 2021
@gluax gluax self-assigned this Jun 16, 2021
@gluax gluax added the priority-high A high priority bug/task in Leo. label Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-high A high priority bug/task in Leo.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants