Skip to content

Kind checker doesn't check that struct fields are copyable #3481

Closed
@catamorphism

Description

@catamorphism

kind::check_expr just doesn't have a case for structs, so you can write:

B { foo: x }

if x has type ~T and B is a struct with a ~T field foo.

This wasn't showing up before because last-use was enabled and most values involved in initializing a struct are going to be last uses.

I have a fix, testing it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions