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

op2 allows #[smi] annotation for return type if we return "()" #758

Open
bartlomieju opened this issue May 28, 2024 · 0 comments
Open

op2 allows #[smi] annotation for return type if we return "()" #758

bartlomieju opened this issue May 28, 2024 · 0 comments
Labels
bug Something isn't working ops op functionality

Comments

@bartlomieju
Copy link
Member

This code should not compile:

#[op2(fast)]
#[smi]
fn op_get_exit_code(state: &mut OpState) {
  state.borrow_mut::<ExitCode>().get();
}

Notice that we annotate with #[smi] for return type, but we are returning ().

@bartlomieju bartlomieju added bug Something isn't working ops op functionality labels May 28, 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 ops op functionality
Projects
None yet
Development

No branches or pull requests

1 participant