| // Copyright 2009 the Sputnik authors. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| If Type(NewExpression) or Type(MemberExpression) is not Object, throw |
| description: Checking boolean primitive case |
| $ERROR('#1: new true throw TypeError'); |
| if ((e instanceof TypeError) !== true) { |
| $ERROR('#1: new true throw TypeError'); |
| $ERROR('#2: var x = true; new x throw TypeError'); |
| if ((e instanceof TypeError) !== true) { |
| $ERROR('#2: var x = true; new x throw TypeError'); |
| $ERROR('#3: var x = true; new x() throw TypeError'); |
| if ((e instanceof TypeError) !== true) { |
| $ERROR('#3: var x = true; new x() throw TypeError'); |