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

If trying to use an undefined label and an undefined macro, etk panics #124

Open
jochem-brouwer opened this issue Aug 4, 2023 · 0 comments

Comments

@jochem-brouwer
Copy link

Min example:

%macro revert_if_neq() 
        push1 revert    # [revert, a != b]
%end

%revert_if_neq()
%revert()

Note: revert is used as macro and as label but is not defined.

Panic:

thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `Some(2)`,
 right: `Some(0)`', /home/jochem/.cargo/registry/src/github.com-1ecc6299db9ec823/etk-asm-0.2.1/src/asm.rs:691:17
stack backtrace:
   0: rust_begin_unwind
             at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/std/src/panicking.rs:575:5
   1: core::panicking::panic_fmt
             at /rustc/90743e7298aca107ddaa0c202a4d3604e29bfeb6/library/core/src/panicking.rs:65:14
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
   4: etk_asm::asm::Assembler::expand_macro
   5: etk_asm::asm::Assembler::push
   6: etk_asm::ingest::SourceStack<W>::write
   7: etk_asm::ingest::Ingest<W>::ingest_file
   8: eas::main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@jochem-brouwer and others