mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-28 23:46:55 +00:00
qapi: Catch and reject flat union branch of array type
Backports commit f9a1427361fe06ac67480d580412dc4ed6f5d03b from qemu
This commit is contained in:
parent
52e7d76d23
commit
ed3da56d26
|
@ -579,7 +579,7 @@ def check_union(expr, expr_info):
|
|||
# Each value must name a known type; furthermore, in flat unions,
|
||||
# branches must be a struct with no overlapping member names
|
||||
check_type(expr_info, "Member '%s' of union '%s'" % (key, name),
|
||||
value, allow_array=True, allow_metas=allow_metas)
|
||||
value, allow_array=not base, allow_metas=allow_metas)
|
||||
if base:
|
||||
branch_struct = find_struct(value)
|
||||
assert branch_struct
|
||||
|
|
Loading…
Reference in a new issue