Skip to content
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

Support [] default value for sequences #10763

Closed
jdm opened this issue Apr 20, 2016 · 5 comments
Closed

Support [] default value for sequences #10763

jdm opened this issue Apr 20, 2016 · 5 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Apr 20, 2016

Adding void passOptionalSequenceWithDefault(optional sequence<long> seq = []); or dictionary Foo { sequence<DOMString> = []; }; yields TypeError: Can't handle non-null default value here.

@tigercosmos
Copy link
Collaborator

@tigercosmos tigercosmos commented Nov 3, 2017

@jdm could you explain more?

@jdm
Copy link
Member Author

@jdm jdm commented Nov 3, 2017

If we add void passOptionalSequenceWithDefault(optional sequence<long> seq = []); to components/script/dom/webidls/TestBinding.webidl, we get a TypeError when executing CodegenRust.py, and it comes from https://dxr.mozilla.org/servo/rev/edb2db55b7fd72370a90fc65c5984d6b7e0f792f/components/script/dom/bindings/codegen/CodegenRust.py#674.

@KiChjang
Copy link
Member

@KiChjang KiChjang commented Nov 7, 2017

@tigercosmos Are you interested in working on this?

@tigercosmos
Copy link
Collaborator

@tigercosmos tigercosmos commented Nov 7, 2017

Not now. Please take it.

@saschanaz
Copy link
Contributor

@saschanaz saschanaz commented Aug 28, 2019

Fixed by #22084

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.