mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 15:28:39 +09:00
Add some tests for distinguishability of unions
This commit is contained in:
parent
740f68378f
commit
17d23ee848
1 changed files with 4 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue