Skip to content
This repository has been archived by the owner on Jun 12, 2023. It is now read-only.

Reference struct field #25

Closed
pzipper opened this issue Mar 21, 2023 · 0 comments
Closed

Reference struct field #25

pzipper opened this issue Mar 21, 2023 · 0 comments
Labels
A-codegen Area: the code generator backend A-typechecker Area: the type checker C-bug Category: Bug report or fix
Milestone

Comments

@pzipper
Copy link
Member

pzipper commented Mar 21, 2023

struct MyStruct {
    member: i32,
}

func InitMember(member: ~mut i32) {
    *member = 0;
}

func Main() {
    var my_struct = MyStruct .{};
    InitMember(~mut my_struct.member);
}
@pzipper pzipper added A-typechecker Area: the type checker A-codegen Area: the code generator backend feat-language labels Mar 21, 2023
@pzipper pzipper added this to the 0.3.0-alpha milestone Mar 21, 2023
@pzipper pzipper added the C-bug Category: Bug report or fix label Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-codegen Area: the code generator backend A-typechecker Area: the type checker C-bug Category: Bug report or fix
Projects
None yet
Development

No branches or pull requests

1 participant