Open jfecher opened 1 week ago
I'm not sure what's the best way to solve this.
Right now we check that the types unify, but the value we pass doesn't change. So if we pass a Value::Field
it remains a Field
.
We could cast that value to the target type, though that would only work for primitive types. That said, you can't pass an array in an attribute because right now it doesn't parse... but I guess we'd eventually want to support that.
@asterite I'm not sure on a good way either. I suppose we'd have to pass down an expected type when creating the attribute arguments to begin with.
Aim
Expected Behavior
u32
to be printedBug
Field
is printed, and if we use i in an operation with a u32, e.g.i == x
we'll get an error that we can't perform an equality on a Field and a u32.To Reproduce
1. 2. 3. 4.
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Nargo Version
No response
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response