• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2025 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    0.0;
18    return undefined;
19})();
20
21(() => {
22    'hello';
23    return undefined;
24})();
25
26(() => {
27    (1.0 + 2.0);
28    return undefined;
29})();
30
31interface GeneratedObjectLiteralInterface_1 {
32    a: number;
33    b: number;
34}
35(() => {
36    ({ a: 1.0, b: 2.0 } as GeneratedObjectLiteralInterface_1);
37    return undefined;
38})();
39
40(() => {
41    [1.0, 2.0, 3.0];
42    return undefined;
43})();
44
45(() => {
46    console.log('expression evaluated');
47    return undefined;
48})();
49
50const undefined_value = (() => {
51    1.0;
52    return undefined;
53})();
54
55const undefined_value2: undefined = (() => {
56    2.0;
57    return undefined;
58})();
59
60const undefined_value3: number | undefined = (() => {
61    3.0;
62    return undefined;
63})();
64
65(() => {
66    (() => {
67    1.0;
68    return undefined;
69})();
70    return undefined;
71})();
72
73(() => {
74    (() => {
75    console.log('foo');
76});
77    return undefined;
78})();
79
80(() => {
81    (() => {
82    console.log("bar!");
83})();
84    return undefined;
85})();
86
87(() => {
88    (() => {
89    console.log('baz!');
90})();
91    return undefined;
92})();
93
94(() => {
95    (class {
96    });
97    return undefined;
98})();
99
100(() => {
101    (class {
102    });
103    return undefined;
104})();
105
106(() => {
107    (() => { });
108    return undefined;
109})();
110
111function foo() {
112  let a: number = 1.0;
113  (() => {
114    a++;
115    return undefined;
116})();
117
118  let b: number[] = [1.0, 2.0, 3.0];
119  (() => {
120    console.log(b.filter(x => x % 2.0 !== 0.0));
121    return undefined;
122})();
123
124  (() => {
125    (() => {
126    console.log('foo');
127});
128    return undefined;
129})();
130
131  (() => {
132    (() => {
133    console.log('foo');
134});
135    return undefined;
136})();
137
138  (() => {
139    (class {
140    });
141    return undefined;
142})();
143
144  (() => {
145    (class localClass {
146    });
147    return undefined;
148})();
149}
150