/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import a from 'assert';
let b = 1;
let c = { name1: b };
{
    const { name1: k = 2 } = c;
    k;
    a(k === 1);
}
a(c.name1 === 1);
(function () {
    var j;
    for ({ s0: j = 5 } of [{ s0: 1 }]) {
        a(j === 1);
    }
})();
(function () {
    var i;
    for ({ s1: i = 5 } of [{ s1: i }]) {
        a(i === 5);
    }
})();
(function () {
    let h;
    ({ y: h = 5 } = { y: 1 });
    a(h === 1);
})();
(function () {
    let e: string, f: {
        x: number;
    };
    let g: any = { y2: "1", y3: { x: 2 } };
    ({ y2: e = '5', y3: f = { x: 1 } } = g);
    a(e === '1');
    a(f.x === 2);
})();
(function () {
    let d;
    ({ z: d = { x: 5 } } = { z: { x: 1 } });
    a(d.x === 1);
})();
