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

aiken/builtin.{un_constr_data} return type is a Pair #10

Open
ariady-putra opened this issue Oct 31, 2024 · 0 comments
Open

aiken/builtin.{un_constr_data} return type is a Pair #10

ariady-putra opened this issue Oct 31, 2024 · 0 comments

Comments

@ariady-putra
Copy link

image
https://aiken-lang.github.io/prelude/aiken/builtin.html#un_constr_data
 94fn constr_data_to_datum(constr: Data) -> Datum {
 95let (i, ds) = builtin.un_constr_data(constr)
    ·       ───┬───
    ·          ╰── expected type 'Pair<Int, List<Data>>'

The return type of it:

pub fn un_constr_data(data: Data) -> (Int, List<Data>) {
fail
}

It should be a Pair, not a tuple


I know there's if-is, but since choose_data is not deprecated yet I need to create a showcase project to explain it to people.

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

1 participant