Skip to content

Pointer to structs #608

@certik

Description

@certik

After #606 is fixed, we need to support the following use case:

@dataclass
class A:
    x: i32
    y: f32

def f(pa: Pointer[A]):
    print(pa.x)
    print(pa.y)

def g():
    x: A = A()
    px: Pointer[A] = pointer(x)
    px.x = 5
    px.y = 5.5
    f(px)

g()

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