mirror of
				https://github.com/qemu/qemu.git
				synced 2025-10-31 12:07:31 +00:00 
			
		
		
		
	 fa110c6a9e
			
		
	
	
		fa110c6a9e
		
	
	
	
	
		
			
			When we introduced the QAPISchema intermediate representation (commit
ac88219a6c), we took a shortcut: we left check_exprs() & friends
alone instead of moving semantic checks into the
QAPISchemaFOO.check().  The .check() assert check_exprs() did its job.
Time to finish the conversion job.  Move exactly the context-sensitive
checks to the .check().  They replace assertions there.  Context-free
checks stay put.
Fixes the misleading optional tag error demonstrated by test
flat-union-optional-discriminator.
A few other error message improve.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190927134639.4284-17-armbru@redhat.com>
		
	
			
		
			
				
	
	
		
			3 lines
		
	
	
		
			210 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			3 lines
		
	
	
		
			210 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| tests/qapi-schema/flat-union-string-discriminator.json: In union 'TestUnion':
 | |
| tests/qapi-schema/flat-union-string-discriminator.json:13: discriminator member 'kind' of base type 'TestBase' must be of enum type
 |