<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [JSC] tagged-templates.js test fails occasionally"
href="https://bugs.webkit.org/show_bug.cgi?id=145820#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [JSC] tagged-templates.js test fails occasionally"
href="https://bugs.webkit.org/show_bug.cgi?id=145820">bug 145820</a>
from <span class="vcard"><a class="email" href="mailto:utatane.tea@gmail.com" title="Yusuke Suzuki <utatane.tea@gmail.com>"> <span class="fn">Yusuke Suzuki</span></a>
</span></b>
<pre>Reproduced by the following test.
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + JSON.stringify(actual));
}
function raw(siteObject) {
var result = '';
for (var i = 0; i < siteObject.raw.length; ++i) {
result += siteObject.raw[i];
if ((i + 1) < arguments.length) {
result += arguments[i + 1];
}
}
return result;
}
function Counter() {
var count = 0;
return {
toString() {
return count++;
}
};
}
for (var i = 0; i < 10000; ++i) {
print(i);
var c = Counter();
shouldBe(raw`Hello ${c} World ${c}`, `Hello 0 World 1`);
}</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>