mirror of https://github.com/tc39/test262.git
33 lines
812 B
JavaScript
33 lines
812 B
JavaScript
|
// Copyright 2009 the Sputnik authors. All rights reserved.
|
||
|
// This code is governed by the BSD license found in the LICENSE file.
|
||
|
|
||
|
/*---
|
||
|
info: MemberExpression and CallExpression uses GetValue
|
||
|
es5id: 11.2.1_A2
|
||
|
description: >
|
||
|
If GetBase(MemberExpression or CallExpression) is null, throw
|
||
|
ReferenceError
|
||
|
---*/
|
||
|
|
||
|
//CHECK#1
|
||
|
try {
|
||
|
object[1];
|
||
|
$ERROR('#1.1: object[1] throw ReferenceError. Actual: ' + (object[1]));
|
||
|
}
|
||
|
catch (e) {
|
||
|
if ((e instanceof ReferenceError) !== true) {
|
||
|
$ERROR('#1.2: object[1] throw ReferenceError. Actual: ' + (e));
|
||
|
}
|
||
|
}
|
||
|
|
||
|
//CHECK#2
|
||
|
try {
|
||
|
object.prop;
|
||
|
$ERROR('#2.1: object.prop throw ReferenceError. Actual: ' + (object.prop));
|
||
|
}
|
||
|
catch (e) {
|
||
|
if ((e instanceof ReferenceError) !== true) {
|
||
|
$ERROR('#2.2: object.prop throw ReferenceError. Actual: ' + (e));
|
||
|
}
|
||
|
}
|