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
|
|
|
/*---
|
|
|
|
info: If the property doesn't have the DontDelete attribute, return true
|
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 declared variable
|
|
|
|
---*/
|
2011-09-07 08:35:18 +02:00
|
|
|
|
|
|
|
//CHECK#1
|
2020-09-11 17:58:45 +02:00
|
|
|
function MyFunction() {}
|
2011-09-07 08:35:18 +02:00
|
|
|
var MyObject = new MyFunction();
|
|
|
|
MyObject.prop = 1;
|
|
|
|
if (delete MyObject.prop !== true) {
|
2020-09-11 17:58:45 +02:00
|
|
|
$ERROR(
|
|
|
|
'#1: function MyFunction(){}; var MyObject = new MyFunction(); MyFunction.prop = 1; delete MyObject.prop === true'
|
|
|
|
);
|
2011-09-07 08:35:18 +02:00
|
|
|
}
|