michael@0: // Copyright 2009 the Sputnik authors. All rights reserved. michael@0: // This code is governed by the BSD license found in the LICENSE file. michael@0: michael@0: /** michael@0: * Only Function objects implement [[HasInstance]] and can be proper ShiftExpression for the "instanceof" operator consequently michael@0: * michael@0: * @path ch11/11.8/11.8.6/S11.8.6_A6_T1.js michael@0: * @description Checking "this" case michael@0: */ michael@0: michael@0: //CHECK#1 michael@0: try{ michael@0: ({}) instanceof this; michael@0: $ERROR('#1: Only Function objects implement [[HasInstance]] and consequently can be proper ShiftExpression for The instanceof operator'); michael@0: } michael@0: catch(e){ michael@0: if (e instanceof TypeError !== true) { michael@0: $ERROR('#1: Only Function objects implement [[HasInstance]] and consequently can be proper ShiftExpression for The instanceof operator'); michael@0: } michael@0: } michael@0: