Skip to content

support structs #4

@andrewrk

Description

@andrewrk
struct Aoeu {
    field: i32,
    field2: bool,
}
  • struct on the stack, read / write fields
  • accept a struct pointer as a parameter. read / write fields
  • debug information for structs
  • struct which has a member which is a pointer to same struct
  • struct which has a member which is another struct declared later
  • circular reference struct is an error
  • invalid field access error test
  • assign to invalid field error test
  • assign one byvalue struct to another
  • struct initializer syntax
  • assign field to constant struct error
  • redefinition of struct error
  • pub vs private vs export structs
  • error for modifying a byval parameter
  • error for byval struct parameter in exported function (since we don't yet support it)
  • error for missing field in struct value expression
  • error for incorrect field in struct value expression
  • error for taking mutable address of const struct field

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementSolving this issue will likely involve adding new logic or components to the codebase.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions