| /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 assertEQ( foo(new Number()), "N" ) 35 function foo(p: Number|null): string { 38 function foo(p: UT): string { 43 assertEQ( foo(new Number()), "UT" ) 49 function foo(p: Number|null): string { 52 function foo(p: UT): string { 55 function foo(p: number): string { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ani/tests/mangling/ |
| D | mangle_signature_test.ets | 23 foo() {} 24 foo(x: boolean) {} 25 foo(x: char) {} 26 foo(x: byte) {} 27 foo(x: short) {} 28 foo(x: int) {} 29 foo(x: long) {} 30 foo(x: float) {} 31 foo(x: double) {} 32 foo(x: double, y: A, z: B): E { return E.R } [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/04.names_declarations_and_scopes/05.accessible/ |
| D | type_name_interface_prop.params.yaml | 20 foo = 0x80 as byte; 24 assertEQ(a.foo, 0x80 as byte); 25 assertEQ(a.bar(a.foo), 0x80 as byte); 31 foo = 0x7FFF as short; 35 assertEQ(a.foo, 0x7FFF as short); 36 assertEQ(a.bar(a.foo), 0x7FFF as short); 42 foo = 127 as int; 46 assertEQ(a.foo, 127 as int); 47 assertEQ(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 assertEQ(a.foo, 0x80 as byte); 28 assertEQ(A.sbar(a.foo), 0x80 as byte); 34 foo: T = 0x7FFF as short; 40 assertEQ(a.foo, 0x7FFF as short); 41 assertEQ(a.bar(a.foo), 0x7FFF as short); 42 assertEQ(A.sbar(a.foo), 0x7FFF as short); 48 foo: T = 127 as int; 54 assertEQ(a.foo, 127 as int); 55 assertEQ(a.bar(a.foo), 127 as int); [all …]
|
| D | type_name_const_enum.ets | 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_enum.ets | 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/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;} 101 foo() { res = 1;} 102 foo(): int { res = 2; return 1;} 106 foo(i: number) { res = 1;} 107 foo(j: number) { res = 2;} 111 foo(i: Number) { res = 1;} 112 foo(j: Double) { res = 2;} 116 foo(i: Number|undefined|null) { res = 1;} 117 foo(j: undefined|null|Number) { res = 2;} [all …]
|
| D | class_method_over_n3.params.yaml | 23 foo(i: T, j: S) { 27 static foo<X,Y>(i: X, j: Y) { 32 foo(i: T, j: S) { 36 static foo<X,Y>(i: X, j: Y) { 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: A) { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/interop_js/tests/test_inheritance/ts_to_ets/ |
| D | ts_inheritance.ts | 31 const fooSecondName = 'Foo'; 35 class Foo extends Base { class 44 let foo = new Foo(); 45 ASSERT_TRUE(foo.firstName === baseFirstName); 46 ASSERT_TRUE(testField(foo)); 50 let foo = new Foo(); 51 ASSERT_TRUE(foo.secondName === fooSecondName); 52 ASSERT_TRUE(testCoverField(foo, fooSecondName)); 56 let foo = new Foo(); 57 ASSERT_TRUE(foo.age === baseAge); [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/08.function_method_and_constructor_overloading/01.function_overloading/ |
| D | fn_overloading.ets | 26 function foo(a: byte): int { 29 function foo(a: short): int { 32 function foo(a: char): int { 35 function foo(a: int): int { 38 function foo(a: long): int { 41 function foo(a: float): int { 44 function foo(a: double): int { 47 function foo(a: boolean): int { 50 function foo(a: Byte): int { 53 function foo(a: Short): int { [all …]
|
| D | fn_overloading_n.params.yaml | 17 function foo() {} 18 function foo(): void {} 21 function foo(): void throws {} // CTE on 'throws' expected 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.ets | 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 assertTrue(foo() == 127 as byte); 24 function foo() { // infer Byte 28 let b = foo(); 33 function foo() { // infer short 37 assertTrue(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/02.override-compatible_signatures/ |
| 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_compatibility_tuple.params.yaml | 18 foo(i: TPL_BB) { 28 foo(i: TPL_BB) { 38 new Derived().foo(bb) 47 foo(i: TPL_OB) { 51 foo(i: TPL_BD) { 55 new Derived().foo(bd) 57 new Derived().foo(ob) 62 foo(i: TPL_DO) { 66 foo(i: TPL_DD) { 70 new Derived().foo(dd) [all …]
|
| D | override_compatibility_array.params.yaml | 18 foo(i: Base[]) { 22 override foo(i: Base[]) { 26 new Derived().foo([new Base()]) 28 new Derived().foo([new Derived()]) 34 foo(i: Base[]) { 38 foo(i: Derived[]) { 42 new Derived().foo([new Derived()]) 47 foo(i: Derived[]) { 51 foo(i: Base[]) { 55 new Derived().foo([new Derived()]) [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/09.classes/06.method_declarations/09.methods_returning_this/ |
| D | met_ret_this.params.yaml | 20 foo(): this { 29 assertEQ(a.foo().foo(), a) 37 function foo(this: B, p: int): this { 42 foo(): this { 49 assertEQ(a.foo().foo(10).foo(), a) 56 foo(p: T): this { 65 assertEQ(a.foo(new Error).foo(new Error), a) 71 foo<T extends Error>(p: T): this { 89 assertEQ(a.foo<Er>(new Er).bar<Number>(11.0), a) 94 function foo(this: A): this { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/13.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 assertTrue(foo() == "foo") 48 function foo() { // infer int 52 let v: int = foo(); [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 assertEQ( foo(11, 12, 13), 36 ) 47 assertEQ( foo(11), 16 ) 48 assertEQ( foo(), 6 ) 53 function foo(a: int = z + y * x) { 56 call: foo() 61 function foo(a: Object = z, b: string[] = [y], c: Object|null = x) { 66 call: foo() [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/ets_frontend/ets2panda/linter/test/interop/ |
| D | increases_decreases_js_obj.ets.migrate.ets | 16 let foo = GeneratedImportVar_1.getProperty('foo'); 19 a = foo.getProperty("num").toNumber() 20 foo.setProperty(num, a + 1.0) 23 a = foo.getProperty("num").toNumber() 25 foo.setProperty(num, a) 27 a = foo.getProperty("num").toNumber() 28 foo.setProperty(num, a - 1.0) 31 a = foo.getProperty("num").toNumber() 33 foo.setProperty(num, a) 36 let tmp_1 = foo.getProperty("num").toNumber() [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/16.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 assertTrue((await new A().foo(42)) == 84) 37 async foo(p: int): Promise<Int> { 43 assertTrue((await new A().foo(42)) == 84) 47 async foo(p: Double): Promise<Double> { 53 assertTrue((await new A().foo(new Double(42.0))) == 84.0) 57 async foo(p: Double): Promise<Double> { 63 assertTrue((await new A().foo(new Double(42.0))) == 84.0) [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/16.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 assertTrue((await foo(42)) == 84) 32 async function foo(p: int): Promise<Int> { 37 assertTrue((await foo(42)) == 84) 40 async function foo(p: Double): Promise<Double> { 45 assertTrue((await foo(new Double(42.0))) == 84.0) 48 async function foo(p: Double): Promise<Double> { 53 assertTrue((await foo(new Double(42.0))) == 84.0) [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.ets | 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 …]
|