Incorrect behaviour when accessing property of `Number.prototype` from a number literal - by davidchambers

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


ID 696145 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 10/21/2011 2:11:36 PM
Access Restriction Public

Description

Object.defineProperty(Number.prototype, 'foo', {
  get: function () { return this }
})

console.log(10.5.foo)
console.log(10..foo)   // 0 in IE9!
console.log(10.0.foo)  // 0 in IE9!
console.log(10.01.foo)
console.log((10).foo)  // 0 in IE9!
var x = 10
console.log(x.foo)     // 0 in IE9!

According to CMS on Stack Overflow, this also affects IE10 Preview: http://stackoverflow.com/questions/7854948.
Sign in to post a comment.
Posted by Microsoft on 6/6/2012 at 9:42 AM



Thank you for your feedback.

This issue was resolved in Internet Explorer 10 Platform Preview 6 on Windows 8 Release Preview released on 5/31/2012.
You can download Windows 8 Release Preview from http://windows.microsoft.com/en-US/windows-8/release-preview.
Please verify the changes and file a new feedback or reactivate the existing one if the problem persists.

Best regards,

The Internet Explorer Team

    
Posted by Microsoft on 12/12/2011 at 12:59 PM
Thank you for your feedback.

We were able to reproduce the issue and are investigating it.

Best regards,

The Internet Explorer Team