symbol-to-string.js (493B)
1 // Copyright (C) 2013 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 esid: sec-addition-operator-plus 5 es6id: 12.7.3 6 description: Symbol value cannot be converted to a String 7 info: | 8 [...] 9 7. If Type(lprim) is String or Type(rprim) is String, then 10 a. Let lstr be ? ToString(lprim). 11 features: [Symbol] 12 ---*/ 13 14 var s = Symbol('66'); 15 assert.throws(TypeError, function() { 16 s + ''; 17 }); 18 19 reportCompare(0, 0);