nested deconstruction : aiken wrongly prefers let #606
Replies: 6 comments
-
You shouldn't heavily nest expects atm to be honest. I suggest splitting this into a let and then expect. |
Beta Was this translation helpful? Give feedback.
-
I would prefer the terser form be permitted, but if it isnt then this should fail to compile |
Beta Was this translation helpful? Give feedback.
-
Wait |
Beta Was this translation helpful? Give feedback.
-
A has one constructor, yes. But B has two, and both a deconstructed so this should be an expect. Disagree that this be a discussion; the above is a bug |
Beta Was this translation helpful? Give feedback.
-
It's a discussion cause the correct thing isn't obvious here. We have two options most likely, I'll give it some thought. It could be that we decide this is a compile error for now. Or we need to discuss semantics of expect, which would be quiet the discussion actually. |
Beta Was this translation helpful? Give feedback.
-
resolved by #683 |
Beta Was this translation helpful? Give feedback.
-
What Git revision are you using?
unknown - 1.0.8
What operating system are you using, and which version?
nixos
Describe what the problem is?
In nested deconstruction,
On build aiken suggests only to get rid of the unused constructor.
Using expect in place of let, aiken suggests using let
What should be the expected behavior?
aiken recognizes it as expect
Beta Was this translation helpful? Give feedback.
All reactions