Throwing when symbol *wrappers* are converted to primitives

Gary Guo nbdd0121 at
Sat Dec 27 00:04:21 PST 2014

The first one makes no sense to me, since a symbol can be used as a property key. The latter one makes sense but the error should be "Cannot convert a Symbol value to a string".
>From: axel at
>Date: Sat, 27 Dec 2014 08:17:40 +0100
>>Both exceptions make a lot of sense, but I don¡¯t see that in the spec. The way I¡¯d expect it to happen is via `Symbol.prototype[@@toPrimitive]` ¨C it would always throw. But that¡¯s not the case. 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list