Commit 8abfe8f2 authored by Feng Yu's avatar Feng Yu Committed by V8 LUCI CQ

[builtins] Improve kIteratorSymbolNonCallable error message

Bug: v8:12918
Change-Id: Id3419cf7cef833cc8e18948874c40e13a3f20675
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3798522
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82150}
parent c0471606
...@@ -120,7 +120,8 @@ namespace internal { ...@@ -120,7 +120,8 @@ namespace internal {
T(InvalidUnit, "Invalid unit argument for %() '%'") \ T(InvalidUnit, "Invalid unit argument for %() '%'") \
T(IterableYieldedNonString, "Iterable yielded % which is not a string") \ T(IterableYieldedNonString, "Iterable yielded % which is not a string") \
T(IteratorResultNotAnObject, "Iterator result % is not an object") \ T(IteratorResultNotAnObject, "Iterator result % is not an object") \
T(IteratorSymbolNonCallable, "Found non-callable @@iterator") \ T(IteratorSymbolNonCallable, \
"Spread syntax requires ...iterable[Symbol.iterator] to be a function") \
T(IteratorValueNotAnObject, "Iterator value % is not an entry object") \ T(IteratorValueNotAnObject, "Iterator value % is not an entry object") \
T(LanguageID, "Language ID should be string or object.") \ T(LanguageID, "Language ID should be string or object.") \
T(LocaleNotEmpty, \ T(LocaleNotEmpty, \
......
*%(basename)s:5: TypeError: Found non-callable @@iterator *%(basename)s:5: TypeError: Spread syntax requires ...iterable[Symbol.iterator] to be a function
console.log(1, ...x); console.log(1, ...x);
^ ^
TypeError: Found non-callable @@iterator TypeError: Spread syntax requires ...iterable[Symbol.iterator] to be a function
at *%(basename)s:5:9 at *%(basename)s:5:9
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment