• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
16declare function print(str:any):string;
17var x1 = 15;
18var y1 = 1;
19var r1 = x1 ^ y1;
20print(r1);
21
22var x2 = 15.8;
23var y2 = 1;
24var r2 = x2 ^ y2;
25print(r2);
26
27var x3 = 15;
28var y3 = 1.8;
29var r3 = x3 ^ y3;
30print(r3);
31
32var x4 = 15.8;
33var y4 = 1.8;
34var r4 = x4 ^ y4;
35print(r4);
36
37var x5:any = "15";
38var y5:number = 1;
39var r5 = x5 ^ y5;
40print(r5);
41
42var x6 = -15;
43var y6 = 1;
44var r6 = x6 ^ y6;
45print(r6);
46
47var x7 = 15;
48var y7 = -1;
49var r7 = x7 ^ y7;
50print(r7);
51
52// not supported type: string, bigint
53