You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Similar to #4469 but extracted as a different issue as this is slightly more difficult to implement (it probably requires rewriting how paths are solved) and it's also maybe less common.
We do allow Field::add(1, 2), but that's parsed as a TypePath. In this case MyField::add would be a regular path, but the tricky thing is that we need to resolve the alias and look up the method in that aliased type. And generics could follow MyField, for example in an alias like type Array<T> = [T], so the method we end up looking up is relative to the given generics. So, path lookup is mixed with type resolution, which is not how it currently works.
Expected Behavior
The above snippet (and more complex ones) work.
Bug
The above doesn't compile.
To Reproduce
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
The text was updated successfully, but these errors were encountered:
Aim
Similar to #4469 but extracted as a different issue as this is slightly more difficult to implement (it probably requires rewriting how paths are solved) and it's also maybe less common.
The idea is that this works:
We do allow
Field::add(1, 2)
, but that's parsed as aTypePath
. In this caseMyField::add
would be a regular path, but the tricky thing is that we need to resolve the alias and look up the method in that aliased type. And generics could followMyField
, for example in an alias liketype Array<T> = [T]
, so the method we end up looking up is relative to the given generics. So, path lookup is mixed with type resolution, which is not how it currently works.Expected Behavior
The above snippet (and more complex ones) work.
Bug
The above doesn't compile.
To Reproduce
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
The text was updated successfully, but these errors were encountered: