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)
The following test should pass: