Avoid assertion failure from SetFuncAllowAttrs when struct is empty#231
Avoid assertion failure from SetFuncAllowAttrs when struct is empty#231tim-hoffman merged 3 commits intomainfrom
SetFuncAllowAttrs when struct is empty#231Conversation
This allows verify() to succeed on an empty `StructDefOp`
iangneal
left a comment
There was a problem hiding this comment.
I'm not sure that we should allow empty structs, since an empty struct can never be used---a call to @compute or @product is required to create a struct (since those are the only places where struct.new is allowed). Is there a use case for this?
That's a fair point. I ran into this in a unit test that uses the C API to create a |
When calling `StructDefOp::verifyRegions()` with an empty struct, the `getBody()` call would give an assertion failure. Instead, check for that case and give the normal error message.
|
@iangneal I fixed the same issue in |
No description provided.