diff options
| author | Maksim Levental <maksim.levental@gmail.com> | 2025-09-15 13:54:03 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-15 10:54:03 -0700 |
| commit | 063d8d7d221406e66eeed859f5c0288d9c98753b (patch) | |
| tree | d4f573c6ddf964037381bac14bb40320100ca547 /mlir/test/python/python_test_ops.td | |
| parent | 06f671e57a574ba1c5127038eff8e8773273790e (diff) | |
[MLIR][Python] fix generated value builder type hints (#158449)
Currently the type hints on the returns of the "value builders" are
`ir.Value`, `Sequence[ir.Value]`, and `ir.Operation`, none of which are
correct. The correct possibilities are `ir.OpResult`, `ir.OpResultList`,
the OpView class itself (e.g., `AttrSizedResultsOp`) or the union of the
3 (for variadic results). This PR fixes those hints.
Diffstat (limited to 'mlir/test/python/python_test_ops.td')
| -rw-r--r-- | mlir/test/python/python_test_ops.td | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mlir/test/python/python_test_ops.td b/mlir/test/python/python_test_ops.td index 026e64a3cfc1..1e94b94dc714 100644 --- a/mlir/test/python/python_test_ops.td +++ b/mlir/test/python/python_test_ops.td @@ -265,4 +265,8 @@ def SameVariadicResultSizeOpFVFVF : TestOp<"same_variadic_result_fvfvf", AnyType:$non_variadic3); } +def ResultsVariadicOp : TestOp<"results_variadic"> { + let results = (outs Variadic<AnyType>:$res); +} + #endif // PYTHON_TEST_OPS |
