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

Inline the use of types #88

Closed
Tracked by #87
clarus opened this issue Jun 15, 2023 · 0 comments · Fixed by #92
Closed
Tracked by #87

Inline the use of types #88

clarus opened this issue Jun 15, 2023 · 0 comments · Fixed by #92
Assignees

Comments

@clarus
Copy link
Collaborator

clarus commented Jun 15, 2023

The file https://github.com/paritytech/ink/blob/2eba99ee445a4aee34d0919041388e7e727f7ed8/crates/env/src/api.rs starts with:

use crate::{
    backend::{
        EnvBackend,
        ReturnFlags,
        TypedEnvBackend,
    }

that is translated to:

Module ReturnFlags := crate.backend.ReturnFlags.
Definition ReturnFlags := ReturnFlags.t.

as EnvBackend and TypedEnvBackend are traits and the use of traits is not handled yet.

The goal of this task is to instead inline the use of backend::ReturnFlags so that this type appears fully prefixed where used. This will require introducing an environment of current used types for the translation of top-level items/expressions.

The rationale of this task is to reduce the number of mutual dependencies between sub-modules of a crate, and simplify the re-ordering that we will do later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant