• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2024-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@interface MyAnno {
17    a : int
18    b : float
19    c : boolean
20}
21
22@interface Anno {
23    a: FixedArray<boolean> = [true & false, false ^ true, true | false]
24    b: FixedArray<int> = [1 + 1 + 1 ^ 11, 48 ? 10 : 20]
25    c: string = "a" + "b"
26}
27
28@MyAnno({a = 1 + -1, b = 1554.4 ^ 10, c = 12 >= 10})
29function foo() {}
30
31const annoA = 10
32const annoB = 1451.1
33const annoC = 123
34@MyAnno({a = annoA, b = annoB ^ 10, c = annoC > 10})
35function foo1() {}
36
37function main() {
38    assertTrue(true)
39}
40