• 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
16import { A, A1, A as A2, B, B1, B as B2, C, C1, C as C2 } from '../ets/test7';
17import { I, J } from '../ets/test7';
18
19let a1 = {} as A;
20let a2 = {} as A1;
21let a3 = {} as A2;
22let b1 = { value: 0 } as B;
23let b2 = { value: 0 } as B1;
24let b3 = { value: 0 } as B2;
25let c1 = { value: 0 } as C;
26let c2 = { value: 0 } as C1;
27let c3 = { value: 0 } as C2;
28
29let i = { v: 0 } as I;
30let j = { v: 0, u: 0 } as J;
31
32class D {}
33
34function foo(d: D): void {}
35foo(new D() as A);
36foo(new D() as A1);
37foo(new D() as A2);
38
39export let t = 123;
40