-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distinguishability of nullable types and dictionaries seems broken #190
Comments
Oh, wow, you parsed "at most one of the two includes a nullable type or is a dictionary type" differently than I did. You did «"includes a nullable type or is a dictionary type" is true of at most one of the two», while I did «at most one of the two includes a nullable type and at most one of the two is a dictionary type». I'll send you a patch. |
Yeah, I agree the original wording could have been clearer..... |
Fix distinguishable algorithm. Closes whatwg#190. Fix record handling in various algorithms. Closes whatwg#191, closes whatwg#189
Fix distinguishable algorithm. Closes whatwg#190. Fix record handling in various algorithms. Closes whatwg#191, closes whatwg#189
Fix distinguishable algorithm. Closes whatwg#190. Fix record handling in various algorithms. Closes whatwg#191, closes whatwg#189.
Consider this IDL:
Is this valid? I believe it shouldn't be.
DOMString?
andSomeDictionaryType
should not be distinguishable. But as the spec stands right now, we have:In this case, the first of the three conditions is true, since
DOMString
andSomeDictionaryType
are distinguishable. Looking at the definition of "includes a nullable type" we have:In this case neither type is a union type. The definition of "nullable type" is:
so only
DOMString?
is a nullable type and the two types are specced distinguishable.This used to not be broken. For example, https://web.archive.org/web/20160801174701/https://heycam.github.io/webidl/ says:
which makes these two types not distinguishable, since both are either nullable or dictionary....
The text was updated successfully, but these errors were encountered: