diff options
author | JustOff <Off.Just.Off@gmail.com> | 2019-03-13 19:01:09 +0200 |
---|---|---|
committer | JustOff <Off.Just.Off@gmail.com> | 2019-03-13 19:01:09 +0200 |
commit | 7d411777a35aedc5cd5f31e58e3d3468a20320b8 (patch) | |
tree | fe3e702c61ec6302658ebab4b674765d9a66a5b3 /dom | |
parent | 50059d734a07f85214dbb5cbdc2d505f274752a0 (diff) | |
download | UXP-7d411777a35aedc5cd5f31e58e3d3468a20320b8.tar UXP-7d411777a35aedc5cd5f31e58e3d3468a20320b8.tar.gz UXP-7d411777a35aedc5cd5f31e58e3d3468a20320b8.tar.lz UXP-7d411777a35aedc5cd5f31e58e3d3468a20320b8.tar.xz UXP-7d411777a35aedc5cd5f31e58e3d3468a20320b8.zip |
Add some tests for distinguishability of unions
Diffstat (limited to 'dom')
-rw-r--r-- | dom/bindings/parser/WebIDL.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dom/bindings/parser/WebIDL.py b/dom/bindings/parser/WebIDL.py index 7d06dbcec..8c71333fa 100644 --- a/dom/bindings/parser/WebIDL.py +++ b/dom/bindings/parser/WebIDL.py @@ -2321,8 +2321,10 @@ class IDLNullableType(IDLParameterizedType): return self def isDistinguishableFrom(self, other): - if (other.nullable() or (other.isUnion() and other.hasNullableType) or - other.isDictionary()): + if (other.nullable() or + other.isDictionary() or + (other.isUnion() and + (other.hasNullableType or other.hasDictionaryType()))): # Can't tell which type null should become return False return self.inner.isDistinguishableFrom(other) |