letconst_global_shadowing.baseline 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. ==== Let/const globals should not show up in for-in enumeration ====
  2. Before x, y, z, w declarations and globals
  3. ReferenceError: Use before declaration
  4. ReferenceError: Use before declaration
  5. ReferenceError: Use before declaration
  6. ReferenceError: Use before declaration
  7. undefined
  8. undefined
  9. undefined
  10. undefined
  11. { }
  12. After let x, this.y, const z, this.w
  13. let x
  14. ReferenceError: Use before declaration
  15. const z
  16. ReferenceError: Use before declaration
  17. undefined
  18. this.y
  19. undefined
  20. this.w
  21. {
  22. y: this.y
  23. w: this.w
  24. }
  25. After this.x, let y, this.z, const w
  26. let x
  27. let y
  28. const z
  29. const w
  30. this.x
  31. this.y
  32. this.z
  33. this.w
  34. {
  35. x: this.x
  36. z: this.z
  37. y: this.y
  38. w: this.w
  39. }
  40. ==== Attributes on global properties should not be lost with let/const shadowing ====
  41. ReferenceError: Use before declaration
  42. this.p
  43. {
  44. value: this.p
  45. writable: false
  46. enumerable: false
  47. configurable: false
  48. }
  49. let p
  50. this.p
  51. {
  52. value: this.p
  53. writable: false
  54. enumerable: false
  55. configurable: false
  56. }
  57. ==== Global properties added after const should not destroy const-ness ====
  58. TypeError: Assignment to const
  59. const q
  60. this.q
  61. ==== Attributes on shadowing let properties should not be lost with Object.defineProperty() ====
  62. 0
  63. undefined
  64. 1
  65. undefined
  66. 1
  67. undefined
  68. 2
  69. undefined
  70. 3
  71. undefined