mirror of
https://github.com/servo/servo.git
synced 2025-09-15 17:38:23 +01:00
Auto merge of #17250 - cbrewster:unwrap_constructor, r=jdm
Unwrap function before calling IsConstructor `IsConstructor` returns true for all wrappers that are callable. Wrapped arrow functions are callable and thus `IsConstructor` will return true if given one; however, if we unwrap the arrow function, `IsConstructor` will return false. The latter is the correct behavior here. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [ ] These changes fix #__ (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17250) <!-- Reviewable:end -->
This commit is contained in:
commit
cdd4de9c06
2 changed files with 10 additions and 6 deletions
|
@ -1,5 +0,0 @@
|
|||
[define.html]
|
||||
type: testharness
|
||||
[If constructor is arrow function, should throw a TypeError]
|
||||
expected: FAIL
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue