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

Map setters using map getters #489

Closed
imaqtkatt opened this issue May 24, 2024 · 0 comments · Fixed by #490
Closed

Map setters using map getters #489

imaqtkatt opened this issue May 24, 2024 · 0 comments · Fixed by #490
Assignees
Labels
bug Something isn't working compilation Compilation of terms and functions to HVM

Comments

@imaqtkatt
Copy link
Contributor

def main():
  map = { 0: 1, 1: 10 }
  map[map[0]] = 99
  return map[map[0]]

Expected: 99
Actual:

thread 'main' panicked at /home/martin/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bend-lang-0.2.18/src/imp/to_fun.rs:366:30:
internal error: entered unreachable code
stack backtrace:
   0: rust_begin_unwind
   1: core::panicking::panic_fmt
   2: core::panicking::panic
   3: bend::imp::to_fun::<impl bend::imp::Expr>::to_fun
   4: bend::imp::to_fun::<impl bend::imp::Stmt>::into_fun
   5: bend::imp::to_fun::<impl bend::imp::Stmt>::into_fun
   6: bend::fun::parser::TermParser::parse_book
   7: bend::execute_cli_mode::{{closure}}
   8: bend::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
@imaqtkatt imaqtkatt self-assigned this May 24, 2024
@imaqtkatt imaqtkatt changed the title Nested map setters Map setters using map getters May 24, 2024
@imaqtkatt imaqtkatt linked a pull request May 24, 2024 that will close this issue
@developedby developedby added bug Something isn't working compilation Compilation of terms and functions to HVM labels May 24, 2024
github-merge-queue bot pushed a commit that referenced this issue May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compilation Compilation of terms and functions to HVM
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants