mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-29 18:47:31 +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
|
return self
|
||||||
|
|
||||||
def isDistinguishableFrom(self, other):
|
def isDistinguishableFrom(self, other):
|
||||||
if (other.nullable() or (other.isUnion() and other.hasNullableType) or
|
if (other.nullable() or
|
||||||
other.isDictionary()):
|
other.isDictionary() or
|
||||||
|
(other.isUnion() and
|
||||||
|
(other.hasNullableType or other.hasDictionaryType()))):
|
||||||
# Can't tell which type null should become
|
# Can't tell which type null should become
|
||||||
return False
|
return False
|
||||||
return self.inner.isDistinguishableFrom(other)
|
return self.inner.isDistinguishableFrom(other)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue