aiken-lang / aiken

A modern smart contract platform for Cardano
https://aiken-lang.org
Apache License 2.0
454 stars 84 forks source link

Aiken error on using tuple index when a tuple is returned by a (generic) function #905

Closed MicroProofs closed 5 months ago

MicroProofs commented 5 months ago

What Git revision are you using?

latest main

What operating system are you using, and which version?

Describe what the problem is?

Using tuple index access on a tuple returned by a function returns a type mismatch error

What should be the expected behavior?

Screenshot 2024-04-01 at 11 18 46 PM

The current workaround is Screenshot 2024-04-01 at 11 18 52 PM

KtorZ commented 5 months ago

But list.at doesn't return a Tuple, it returns an Option 🤨

Never mind, it seems that you use your own list_at