Skip to content

Add support to use a struct inside a module using the "absolute module path" to the struct #190

Description

@edg-l
mod test_direct_use {
    mod first {
        mod second {
            struct Hello {
                a: i32,
            }

            fn hello() -> i32 {
                return 2;
            }
        }
    }

    pub fn main() -> i32 {
        let y: first::second::Hello = first::second::Hello {
            a: 2,
        };
        return y.a;
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions