• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2024 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 * @tc.name:sharedbitvector
18 * @tc.desc:test sharedbitvector
19 * @tc.type: FUNC
20 * @tc.require: issueI8QUU0
21 */
22
23// @ts-nocheck
24declare function print(str: any): string;
25
26class SuperClass {
27    public obj : BitVector;
28    constructor(obj : BitVector) {
29        "use sendable"
30        this.obj = obj;
31    }
32}
33
34function newsharedclassfrom() {
35    let arkPrivate = globalThis.ArkPrivate;
36    var BitVector = arkPrivate.Load(arkPrivate.BitVector);
37    let bitvector = new BitVector(10);
38    bitvector.push(0)
39    bitvector.push(1)
40
41    print("Start Test newsharedclassfrom")
42    try {
43        let bit = new SuperClass(bitvector);
44        print("bitvector pass")
45    } catch (err) {
46        print("bitvector fail")
47    }
48}
49
50newsharedclassfrom()