/*
 * 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 assert from 'assert';
class g {
    [1]() {
        return 1;
    }
    [1 ? 2 : 3]() {
        return 2;
    }
    h() {
        return 3;
    }
    #i() {
        return 4;
    }
    j() {
        return this.#i();
    }
    k() {
        return 5;
    }
    l() {
        return 6;
    }
    m() {
        return 7;
    }
    *o() {
        return 8;
    }
    async p() {
        return 9;
    }
    async *q() {
        return 10;
    }
}
let c = new g();
assert(c[1]() === 1);
assert(c[2]() === 2);
assert(c.h() === 3);
assert(c.j() === 4);
assert(c.k() === 5);
assert(c.l() === 6);
assert(c.m() === 7);
assert(c.o().next().value === 8);
async function f() {
    assert(await c.p() === 9);
    assert((await c.q().next()).value === 10);
}
f();
