[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 05/49] qapi: leave the ifcond attribute undef
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH v3 05/49] qapi: leave the ifcond attribute undefined until check() |
Date: |
Fri, 29 Jun 2018 12:30:15 +0200 |
Hi
On Wed, Jun 27, 2018 at 7:26 AM, Markus Armbruster <address@hidden> wrote:
>>> This is hardly a rigorous proof. Just enough to make me believe your
>>> code works.
>>>
>>> However, I suspect adding the inheritance feature at the entity level
>>> complicates the correctness argument without real need. Can we restrict
>>> it to array elements? Have QAPISchemaArrayType.check() resolve
>>> type-valued ._ifcond, and all the others choke on it?
>>
>> There is also implicit object types.
>
> Can you give an example?
>
{ 'union': 'Foo', 'data': { 'foo': 'Test' } }
will create implicit QAPISchemaObjectType q_obj_Test-wrapper in
_make_simple_variant()
This happens before check(), so we pass the Test type as ifcond.
--
Marc-André Lureau