1/* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16(() => { 17 let result; 18 function TestObjectNull() { 19 result = new Object(null); 20 } 21 22 function TestObjectUndefined() { 23 result = new Object(undefined); 24 } 25 26 function TestObjectNumber() { 27 result = new Object(); 28 } 29 30 TestObjectNull(); 31 print(result) 32 33 TestObjectUndefined(); 34 print(result) 35 36 TestObjectNumber(); 37 print(result) 38 39})(); 40 41let v0 = [1, 2, 3]; 42 43function f3() { 44 return v0; 45} 46 47class C7 { 48 constructor(a9, a10, a11) { 49 a11 / a11; 50 return v0; 51 } 52 static toString(a21, a22) { 53 this["toString"] = a22; 54 const v23 = "2Al" / f3; 55 v0 &= a22; 56 const v24 = new f3(); 57 Reflect.construct(C7, [], C7); 58 return "toString"; 59 } 60} 61 62try { 63 const v39 = new C7("toString", "toString", C7); 64} catch(e) { 65 print(e); 66} 67