| // Copyright 2009 the Sputnik authors. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| If NewExpression or MemberExpression does not implement internal |
| [[Construct]] method, throw TypeError |
| description: Checking String object case |
| $ERROR('#1: new new String("1") throw TypeError'); |
| if ((e instanceof TypeError) !== true) { |
| $ERROR('#1: new new String("1") throw TypeError'); |
| $ERROR('#2: var x = new String("1"); new x throw TypeError'); |
| if ((e instanceof TypeError) !== true) { |
| $ERROR('#2: var x = new String("1"); new x throw TypeError'); |
| $ERROR('#3: var x = new String("1"); new x() throw TypeError'); |
| if ((e instanceof TypeError) !== true) { |
| $ERROR('#3: var x = new String("1"); new x() throw TypeError'); |