2011-09-07 08:35:18 +02:00
|
|
|
// Copyright 2009 the Sputnik authors. All rights reserved.
|
|
|
|
// This code is governed by the BSD license found in the LICENSE file.
|
|
|
|
|
2014-07-22 01:09:02 +02:00
|
|
|
/*---
|
2018-01-05 18:26:51 +01:00
|
|
|
info: |
|
2014-07-22 01:09:02 +02:00
|
|
|
"Delete" operator removes property, which is reference to the object, not
|
|
|
|
the object
|
2020-09-11 17:58:45 +02:00
|
|
|
esid: sec-delete-operator-runtime-semantics-evaluation
|
2014-07-22 01:09:02 +02:00
|
|
|
description: Checking two reference by one object
|
2014-12-11 18:01:59 +01:00
|
|
|
flags: [noStrict]
|
2014-07-22 01:09:02 +02:00
|
|
|
---*/
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
//CHECK#1
|
2011-09-24 17:25:22 +02:00
|
|
|
var obj = new Object();
|
|
|
|
var ref = obj;
|
2011-09-07 08:35:18 +02:00
|
|
|
delete ref;
|
2020-09-11 17:58:45 +02:00
|
|
|
if (typeof obj !== 'object') {
|
|
|
|
$ERROR(
|
|
|
|
'#1: obj = new Object(); ref = obj; delete ref; typeof obj === "object". Actual: ' +
|
|
|
|
typeof obj
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|