Forbid unconditionally-exposed interfaces that inherit from conditionally-exposed ones.

This commit is contained in:
Josh Matthews 2016-03-23 17:11:14 -04:00
parent 91a78ed109
commit f4c1529f56

View file

@ -165,6 +165,12 @@ class Descriptor(DescriptorProvider):
DescriptorProvider.__init__(self, config)
self.interface = interface
if not self.isExposedConditionally():
if interface.parent and interface.parent.isExposedConditionally():
raise TypeError("%s is not conditionally exposed but inherits from "
"%s which is" %
(interface.identifier.name, interface.parent.identifier.name))
# Read the desc, and fill in the relevant defaults.
ifaceName = self.interface.identifier.name