| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/11.function_call_expression/step_1_selection_of_function/ |
| D | step1.params.yaml | 18 function foo(p: Number): string { 21 function foo(p: Number|null): string { 24 function foo(p: UT): string { 29 assert foo(new Number()) == "N" 34 function foo(p: Number|null): string { 37 function foo(p: UT): string { 42 assert foo(new Number()) == "UT" 47 function foo(p: Number|null): string { 50 function foo(p: UT): string { 53 function foo(p: number): string { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/04.names_declarations_and_scopes/05.accesible/ |
| D | type_name_interface_prop.params.yaml | 20 foo = 0x80 as byte; 24 assert(a.foo == 0x80 as byte); 25 assert(a.bar(a.foo) == 0x80 as byte); 31 foo = 0x7FFF as short; 35 assert(a.foo == 0x7FFF as short); 36 assert(a.bar(a.foo) == 0x7FFF as short); 42 foo = 127 as int; 46 assert(a.foo == 127 as int); 47 assert(a.bar(a.foo) == 127 as int); 53 foo = 127 as long; [all …]
|
| D | type_name_class_field.params.yaml | 20 foo: T = 0x80 as byte; 26 assert(a.foo == 0x80 as byte); 28 assert(A.sbar(a.foo) == 0x80 as byte); 34 foo: T = 0x7FFF as short; 40 assert(a.foo == 0x7FFF as short); 41 assert(a.bar(a.foo) == 0x7FFF as short); 42 assert(A.sbar(a.foo) == 0x7FFF as short); 48 foo: T = 127 as int; 54 assert(a.foo == 127 as int); 55 assert(a.bar(a.foo) == 127 as int); [all …]
|
| D | type_name_variable_enum.sts | 29 function foo(i: byte) { 33 function foo(i: short) { 37 function foo(i: int) { 41 function foo(i: long) { 45 function foo(i: float) { 49 function foo(i: number) { 53 function foo(i: char) { 57 function foo(i: boolean) { 61 function foo(i: Byte) { 65 function foo(i: Short) { [all …]
|
| D | type_name_const_enum.sts | 29 function foo(i: byte) { 33 function foo(i: short) { 37 function foo(i: int) { 41 function foo(i: long) { 45 function foo(i: float) { 49 function foo(i: number) { 53 function foo(i: char) { 57 function foo(i: boolean) { 61 function foo(i: Byte) { 65 function foo(i: Short) { [all …]
|
| D | type_name_variable.sts | 28 function foo(i: byte) { 32 function foo(i: short) { 36 function foo(i: int) { 40 function foo(i: long) { 44 function foo(i: float) { 48 function foo(i: number) { 52 function foo(i: char) { 56 function foo(i: boolean) { 60 function foo(i: Byte) { 64 function foo(i: Short) { [all …]
|
| D | type_name_const.sts | 29 function foo(i: byte) { 33 function foo(i: short) { 37 function foo(i: int) { 41 function foo(i: long) { 45 function foo(i: float) { 49 function foo(i: number) { 53 function foo(i: char) { 57 function foo(i: boolean) { 61 function foo(i: Byte) { 65 function foo(i: Short) { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/07.function_and_method_overloading/01.function_overloading/ |
| D | fn_overloading.sts | 25 function foo(a: byte): int { 28 function foo(a: short): int { 31 function foo(a: char): int { 34 function foo(a: int): int { 37 function foo(a: long): int { 40 function foo(a: float): int { 43 function foo(a: double): int { 46 function foo(a: boolean): int { 49 function foo(a: Byte): int { 52 function foo(a: Short): int { [all …]
|
| D | fn_overloading_n.params.yaml | 17 function foo() {} 18 function foo(): void {} 21 function foo(): void throws {} 22 function foo(): void {} 25 function foo(): int { 28 native function foo(): void; 31 function foo(): int { 34 function foo(): short { 39 function foo(... a: byte): void {} 40 native function foo(... b: byte): long; [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/01.evaluation_of_expressions/ |
| D | typ.sts | 24 function foo(a: byte): int { 27 function foo(a: short): int { 30 function foo(a: char): int { 33 function foo(a: int): int { 36 function foo(a: long): int { 39 function foo(a: float): int { 42 function foo(a: double): int { 45 function foo(a: boolean): int { 48 function foo(a: Byte): int { 51 function foo(a: Short): int { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/04.names_declarations_and_scopes/08.function_declarations/08.return_type_inference/ |
| D | ret_type_infer.params.yaml | 17 function foo() { // infer byte 21 assert(foo() == 127 as byte); 24 function foo() { // infer Byte 28 let b = foo(); 33 function foo() { // infer short 37 assert(foo() == 2 as short); 40 function foo() { // infer Short 44 let b = foo(); 49 function foo() { // infer Int 53 let b = foo(); [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/07.overloading_and_overriding/04.overloading_and_overriding_in_classes/ |
| D | single_class_overload_n.params.yaml | 96 foo() { res = 1;} 97 foo() { res = 2;} 103 foo() { res = 1;} 104 foo(): int { res = 2; return 1;} 110 foo(i: number) { res = 1;} 111 foo(j: number) { res = 2;} 117 foo(i: Number) { res = 1;} 118 foo(j: Double) { res = 2;} 124 foo(i: Number|undefined|null) { res = 1;} 125 foo(j: undefined|null|Number) { res = 2;} [all …]
|
| D | class_method_over_n3.params.yaml | 23 foo(i: T, j: S) { 27 static foo(i: T, j: S) { 32 foo(i: T, j: S) { 36 static foo(i: T, j: S) { 41 new Derived<A, B>().foo(new A(), new B()); 43 new Derived<B, I>().foo(new B(), new C()); 45 Derived.foo(new Number(), new String()); 53 foo(i: B) { 57 static foo(i: B) { 62 foo(i: B) { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/07.overloading_and_overriding/02.override-compatible_signatures/ |
| D | override_variance.params.yaml | 19 foo(i: Derived): void { 23 override foo(i: Base): void { 26 call: new Derived().foo(new Base()); 31 foo(i: Derived): void { 35 override foo(i: Base): void { 38 call: new Derived().foo(new Derived()); 44 foo(i: Base): void { 48 override foo(i: Derived): void { 51 call: new Derived().foo(new Base()); 56 foo(): Base { [all …]
|
| D | override_with_object.params.yaml | 19 foo(i: Base): void { 23 override foo(i: Object): void { 26 call: new Derived().foo(new Base()); 31 foo(i: Base): void { 35 override foo(i: Object): void { 38 call: new Derived().foo(new Object()); 44 foo(i: Object): void { 48 override foo(i: Base): void { 51 call: new Derived().foo(new Base()); 56 foo(): Object { [all …]
|
| D | override_compatible_signature.params.yaml | 17 foo(): void { 21 override foo(): void { 24 call: new Derived().foo() 30 foo(): int { 35 override foo(): void { 38 call: new Derived().foo() 44 foo(): void { 48 override foo(i: int): void { 51 call: new Derived().foo(1) 57 foo(i: int, j: string): void { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/04.names_declarations_and_scopes/08.function_declarations/04.optional_parameters/ |
| D | opt_param.params.yaml | 28 …function foo(a: byte = 1, b: short = 2, c: int = 3, d: long = 4, e: float = 5.0, f: double = 6.0, … 38 call: foo() 42 function foo(a: int = 1, b: int = 2, c: int = 3): int { 46 assert foo(11, 12, 13) == 36 47 assert foo(11) == 16 48 assert foo(, 11) == 15 49 assert foo(,, 11) == 14 50 assert foo(11,, 11) == 24 51 assert foo(,,) == 6 52 assert foo() == 6 [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/12.trailing_lambda/ |
| D | trlambda_func.params.yaml | 19 function foo(n: number, f: () => void) { 25 foo(10.0, () => { 33 function foo(n: number, f?: FF) { // optional 39 foo(10.0, () => { 44 foo(10.0) 51 function foo(n: number, f: FF) { 56 foo(10.0) // trailing lambda 64 function foo(n: number, f?: () => void) { // optional 69 foo(10.0) // trailing lambda 75 foo(10.0) [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/04.names_declarations_and_scopes/08.function_declarations/07.return_type/ |
| D | ret_type.params.yaml | 18 function foo() { // infer void 23 foo() 28 function foo() { // infer void 34 foo() 38 let s = "foo" 39 function foo() { // infer string 43 let v: string = foo(); 44 assert(foo() == "foo") 48 function foo() { // infer int 52 let v: int = foo(); [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/17.async_functions_and_methods/01.async_functions/ |
| D | afunc.params.yaml | 17 async function foo(): Promise<void> {} 20 let r = foo() 24 async function foo(p: int): Promise<Int> { 29 assert((await foo(42)) == 84) 32 async function foo(p: int): Promise<Int> { 37 assert((await foo(42)) == 84) 40 async function foo(p: Double): Promise<Double> { 45 assert((await foo(new Double(42.0))) == 84.0) 48 async function foo(p: Double): Promise<Double> { 53 assert((await foo(new Double(42.0))) == 84.0) [all …]
|
| /arkcompiler/ets_frontend/ets2panda/linter/docs/rules/ |
| D | recipe52.md | 21 foo() { 22 console.log("foo") 32 c2.foo = bar 34 c1.foo() // foo 35 c2.foo() // bar 45 foo() { 46 console.log("foo") 51 foo() { 53 super.foo() 63 c1.foo() // foo [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/17.async_functions_and_methods/02.async_methods/ |
| D | ameth.params.yaml | 18 async foo(): Promise<void> {} 22 let r = new A().foo() 27 async foo(p: int): Promise<Int> { 33 assert((await new A().foo(42)) == 84) 37 async foo(p: int): Promise<Int> { 43 assert((await new A().foo(42)) == 84) 47 async foo(p: Double): Promise<Double> { 53 assert((await new A().foo(new Double(42.0))) == 84.0) 57 async foo(p: Double): Promise<Double> { 63 assert((await new A().foo(new Double(42.0))) == 84.0) [all …]
|
| /arkcompiler/runtime_core/static_core/libpandabase/ |
| D | task_runner.h | 28 * runner.AddFinalize(foo); 42 * | call foo; 51 * call foo; 110 template <typename Foo> 111 void AddOnSuccess(Foo foo) in AddOnSuccess() argument 114 callbackOnSuccess_ = NextCallback(std::move(callbackOnSuccess_), std::move(foo)); in AddOnSuccess() 116 callbackOnSuccess_ = std::move(foo); in AddOnSuccess() 121 template <typename Foo> 122 void AddOnFail(Foo foo) in AddOnFail() argument 125 callbackOnFail_ = NextCallback(std::move(callbackOnFail_), std::move(foo)); in AddOnFail() [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/07.overloading_and_overriding/03.overloading_for_functions/modules/ |
| D | function_export_all.sts | 25 export function foo(): int { 29 export function foo(i: boolean): int { 33 export function foo(i: Boolean): int { 37 export function foo(i: char): int { 41 export function foo(i: Char): int { 45 export function foo(i: short): int { 49 export function foo(i: Short): int { 53 export function foo(i: int): int { 57 export function foo(i: Int): int { 61 export function foo(i: long): int { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/04.names_declarations_and_scopes/07.variable_and_constant_declarations/04.type_inference_from_initializer/ |
| D | infer2.params.yaml | 28 function foo(p: (null|undefined)[]): int { return 1 } 31 assertEQ(foo(arr), 1) 35 function foo(p: int): int { return 1 } 36 function foo(p: number): int { return 2 } 40 assertEQ(foo(b), 1) 44 function foo(p: int): int { return 1 } 45 function foo(p: number): int { return 2 } 49 assertEQ(foo(b), 2) 53 function foo(p: string): int { return 1 } 54 function foo(p: "one"|"two"|number): int { return 2 } [all …]
|