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

fix(engine): make consts fun. calls of arity 0 when there is an impl expr #989

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

W95Psp
Copy link
Collaborator

@W95Psp W95Psp commented Oct 10, 2024

The engine was dropping trait information when importing constants: now, if a constant T::CONST is an associated item of a non-inherent trait, we represent it T::CONST as a call to CONST() with the implementation expression for T.

Note that, in the engine, constants are already represented as functions of arity zero. Rust functions of arity zero are represented as functions that take exactly one unit input.

Fixes #840.

…expr

The engine was dropping trait information when importing constants:
now, if a constant `T::CONST` is an associated item of a non-inherent
trait, we represent it `T::CONST` as a call to `CONST()` with the
implementation expression for `T`.

Note that, in the engine, constants are already represented as
functions of arity zero. Rust functions of arity zero are represented
as function that take exactly one `unit` input.

Fixes #840.
@maximebuyse maximebuyse added this pull request to the merge queue Oct 10, 2024
Merged via the queue into main with commit 19fe681 Oct 10, 2024
13 checks passed
@maximebuyse maximebuyse deleted the fix-840 branch October 10, 2024 16:05
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

Successfully merging this pull request may close these issues.

Engine: references to const items in traits not imported properly
2 participants