Skip to content

Term construction fails on dataclass arguments #624

@jfeser

Description

@jfeser

The following test should pass:

def test_defdata_dataclass() -> None:
    @Operation.define
    def f(x: int):
        raise NotHandled

    @dataclasses.dataclass
    class A:
        x: int

        def __init__(self, x: int):
            self.x = f(x)

    @Operation.define
    def g(a: A):
        raise NotHandled

    v = Operation.define(int)
    t = g(A(v()))
    assert isinstance(t.args[0].x, Term)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions