Files

35 lines
658 B
TypeScript

//// [tests/cases/conformance/es6/spread/iteratorSpreadInCall4.ts] ////
//// [iteratorSpreadInCall4.ts]
function foo(s1: symbol, ...s: symbol[]) { }
class SymbolIterator {
next() {
return {
value: Symbol(),
done: false
};
}
[Symbol.iterator]() {
return this;
}
}
foo(...new SymbolIterator);
//// [iteratorSpreadInCall4.js]
"use strict";
function foo(s1, ...s) { }
class SymbolIterator {
next() {
return {
value: Symbol(),
done: false
};
}
[Symbol.iterator]() {
return this;
}
}
foo(...new SymbolIterator);