| /arkcompiler/ets_frontend/ets2panda/linter/test/main/ |
| D | sendable_class_inheritance.sts | 41 interface localSendableInterface extends lang.ISendable {} 56 // case1: extends import var 57 // == case1.1: extends sendable 59 class sendableClass1 extends sendableVar {} // ERROR 61 // == case1.2: extends non-sendable 63 class sendableClass2 extends nonSendableVar {} // ERROR 65 // case2: extends local var 66 // == case2.1: extends sendable 68 class sendableClass3 extends localSendableVar {} // ERROR 70 // == case2.2: extends non-sendable [all …]
|
| /arkcompiler/ets_frontend/es2panda/test/parser/ts/ |
| D | test_infer-type-with-extends4.ts | 17 // Speculative lookahead for `infer T extends U ?` 18 type T10<T> = T extends (infer U extends number ? 1 : 0) ? 1 : 0; // ok, parsed as conditional 19 type X10_Y1<T> = T10<T extends number ? 1 : 0>; 22 type T11<T> = T extends ((infer U) extends number ? 1 : 0) ? 1 : 0; // ok, parsed as conditional 23 type T12<T> = T extends (infer U extends number) ? 1 : 0; // ok, parsed as `infer..extends` (no tra… 24 type T13<T> = T extends infer U extends number ? 1 : 0; // ok, parsed as `infer..extends` (conditio… 25 type T14<T> = T extends keyof infer U extends number ? 1 : 0; // ok, parsed as `infer..extends` (pr… 26 type T15<T> = T extends { [P in infer U extends keyof T ? 1 : 0]: 1; } ? 1 : 0; // ok, parsed as co… 27 type T16<T> = T extends { [P in infer U extends keyof T]: 1; } ? 1 : 0; // ok, parsed as `infer..ex… 28 type T17<T> = T extends { [P in keyof T as infer U extends P ? 1 : 0]: 1; } ? 1 : 0; // ok, parsed … [all …]
|
| D | test_infer-type-with-extends5.ts | 17 type T19<T extends string | number> = T extends (infer U extends number) ? [T, U] : never; 22 type T20<T> = T extends (infer U extends number) ? T extends (infer V extends U) ? [T, U, V] : neve… 25 type T21<T, N extends number> = T extends (infer U extends N) ? [T, U] : never; 33 type IfEquals<X, Y, A, B> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? A… 35 declare const val1: <T>() => (T extends infer U extends number ? 1 : 0); 40 type ExpectNumber<T extends number> = T; 41 declare const val2: <T>() => (T extends ExpectNumber<infer U> ? 1 : 0); 46 type X22<T> = T extends [infer U extends number, infer U extends number] ? string : never; 49 type c<T> = T extends [infer s extends U extends number ? 1:2 ]? 1:2
|
| D | test_infer-type-with-extends1.ts | 18 type T1<T extends any[]> = T extends [infer U extends string] ? ["string", U] : 19 T extends [infer U extends number] ? ["number", U] : 27 type T2<T extends (...args: any[]) => void> = T extends (a: infer U extends string) => void ? ["str… 28 T extends (a: infer U extends number) => void ? ["number", U] : 36 type T3<T extends (...args: any[]) => any> = 37 T extends (...args: any[]) => (infer U extends string) ? ["string", U] : 38 T extends (...args: any[]) => (infer U extends number) ? ["number", U] : 46 type T4<T extends new (...args: any[]) => any> = 47 T extends new (...args: any[]) => (infer U extends { a: string }) ? ["string", U] : 48 T extends new (...args: any[]) => (infer U extends { a: number }) ? ["number", U] :
|
| D | test_infer-type-with-extends2.ts | 19 T extends Promise<infer U extends string> ? ["string", U] : 20 T extends Promise<infer U extends number> ? ["number", U] : 29 T extends { a: infer U extends string } ? ["string", U] : 30 T extends { a: infer U extends number } ? ["number", U] : 39 T extends { a: infer U extends string, b: infer U extends string } ? ["string", U] : 40 T extends { a: infer U extends number, b: infer U extends number } ? ["number", U] :
|
| D | test-ts-conditional-type.ts | 18 …r & boolean extends boolean ? number : string)[] extends ((boolean extends & string ? typeof a : n… 20 var b: boolean & number extends A ? number : string; variable 21 var c: A | number extends string ? number : string; variable 22 var d: boolean | A & string extends string ? number : string; variable 23 var e: boolean & number | string extends string ? number : string; variable 25 type Bar<T> = T extends (infer U)[] 27 : T extends (...args: any[]) => infer U 29 : T extends Promise<infer U>
|
| D | test_generic.ts | 17 function func1<Type, A, B extends readonly number[]>(arg: Type): Type { 21 function func2<A extends { a: number, b: string }>() { } 23 function func3<A extends keyof { a: { b: number, c: boolean }, b: [number, string] }>(a: A, b: stri… 29 interface R<K extends [number, string], T = string> { 34 interface U<A extends readonly [number, number, { a: number, b: string }], Z = boolean> extends R<[… 36 readonly<A extends number>(): [boolean, number[]]; 43 a: function <B, C extends typeof func1>() { }, 45 c<E, F extends readonly []>() { } 48 class A<T extends B, Z = { a: number, b: string }> { 50 private b<E extends (a: number, b: string) => any[]>() { } [all …]
|
| /arkcompiler/ets_frontend/ets2panda/linter/test/ts_import_ets/ts/ |
| D | test4.ts | 21 class D1 extends A {} 22 class D2 extends A1 {} 23 class D3 extends A2 {} 24 class D4 extends B {} 25 class D5 extends B1 {} 26 class D6 extends B2 {} 27 class D7 extends C {} 28 class DerivedFromC1 extends C1 {} 29 class DerivedFromC2 extends C2 {} 31 interface I1 extends I {} [all …]
|
| /arkcompiler/ets_frontend/ets2panda/test/parser/ts/ |
| D | test-ts-conditional-type.ts | 18 …r & boolean extends boolean ? number : string)[] extends ((boolean extends & string ? typeof a : n… 20 var b: boolean & number extends A ? number : string; variable 21 var c: A | number extends string ? number : string; variable 22 var d: boolean | A & string extends string ? number : string; variable 23 var e: boolean & number | string extends string ? number : string; variable 25 type Bar<T> = T extends (infer U)[] 27 : T extends (...args: any[]) => infer U 29 : T extends Promise<infer U>
|
| D | test_generic.ts | 17 function func1<Type, A, B extends readonly number[]>(arg: Type): Type { 21 function func2<A extends { a: number, b: string }>() { } 23 function func3<A extends keyof { a: { b: number, c: boolean }, b: [number, string] }>(a: A, b: stri… 29 interface R<K extends [number, string], T = string> { 34 interface U<A extends readonly [number, number, { a: number, b: string }], Z = boolean> extends R<[… 36 o<A extends number>(): [boolean, number[]]; 43 a: function <B, C extends typeof func1>() { }, 45 c<E, F extends readonly []>() { } 48 class A<T extends B, Z = { a: number, b: string }> { 50 private b<E extends (a: number, b: string) => any[]>() { } [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/05.generics/01.type_parameters/generic_interfaces/ |
| D | generic_interface_self_dependency.params.yaml | 16 - T extends T 17 - U<T extends T> 18 - U<W<T extends T>> 19 - U<U<T extends T>> 20 - T extends U, U extends T 21 - T extends U, U extends W, W extends T
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/05.generics/02.generic_instantiations/ |
| D | basic_instantiations.params.yaml | 17 class OneArg<T extends SomeType> {} 18 class A extends SomeType {} 22 class TwoArgs<T extends SomeType, U extends OtherType> {} 23 class A extends SomeType {} 28 function oneArg<T extends SomeType>() {} 29 class A extends SomeType {} 33 function twoArgs<T extends SomeType, U extends OtherType>() {} 34 class A extends SomeType {}
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/03.types/08.reference_types/12.union_types/access_to_common_union_members/ |
| D | cm_fld2.params.yaml | 25 class AA extends A {} 26 class BB extends B {} 41 class AA extends A {} 42 class BB extends B { 57 class AA extends A {} 58 class BB extends B { 75 class AA extends A { 78 class BB extends B { 96 class B extends A {} 97 class AA extends A {} [all …]
|
| D | cm_meth2.params.yaml | 29 class AA extends A {} 30 class BB extends B {} 49 class AA extends A {} 50 class BB extends B { 69 class AA extends A {} 70 class BB extends B { 93 class AA extends A { 98 class BB extends B { 120 class B extends A {} 121 class AA extends A {} [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/09.final_classes_and_methods/01.final_classes/ |
| D | fc.params.yaml | 22 final class F extends A implements I {} 33 final final class F extends A {} // CTE 41 final abstract class F extends A {} // CTE 49 final class B extends A {} 50 class F extends B {} // CTE 58 abstract class F extends A {} // CTE 66 final class F extends A {} // CTE 73 class A<T extends I> {} 74 final class F<T extends I> extends A<T> {} 83 final class A<T extends I> {} [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/15.semantic_rules/07.overloading_and_overriding/02.override-compatible_signatures/ |
| D | pos.params.yaml | 31 …function foo<T extends X, U extends Y, V extends Z>(t: T, u: U, v: V): T { return new X(); } // CT… 32 function foo<T extends X, U extends Y>(t: T, u: U, v: Object): T { return new X(); } 33 function foo<T extends X>(t: T, u: Object, v: Object): T { return new X(); } 39 …function foo<X extends Z>(a: int, b: long, c: double, d: Object): X { return new Z(); } // CTE: no… 40 function bar<X extends Z>(a: int, b: long, c: double, d: Object): X { return new Z(); } 45 …function foo<X extends Z>(a: int, b: long, c: double, d: Object): X { return new Z(); } // CTE: no… 46 function foo<X extends Z>(a: long, b: long, c: double, d: Object): X { return new Z(); } 65 class A<T extends X, U extends Y> { 74 class A<T extends X, U extends Y> { 83 class A<T extends X, U extends Y> { [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/stdlib/std/core/ |
| D | Errors.sts | 21 export class AssertionError extends Error { 36 export class DivideByZeroError extends Error { 45 export class NullPointerError extends Error { 54 export class UncatchedExceptionError extends Error { 63 export class SyntaxError extends Error { 80 export class JSONTypeError extends Error { 89 export class RangeError extends Error { 106 export final class ArrayIndexOutOfBoundsError extends Error { 115 export final class ArithmeticError extends Error { 124 export class OutOfMemoryError extends Error { [all …]
|
| D | Function.sts | 21 export interface ThrowingFunction0<out R> extends Function<R> { 25 export interface ThrowingFunction1<in P1, out R> extends Function<R> { 29 export interface ThrowingFunction2<in P1, in P2, out R> extends Function<R> { 33 export interface ThrowingFunction3<in P1, in P2, in P3, out R> extends Function<R> { 37 export interface ThrowingFunction4<in P1, in P2, in P3, in P4, out R> extends Function<R> { 41 export interface ThrowingFunction5<in P1, in P2, in P3, in P4, in P5, out R> extends Function<R> { 45 export interface ThrowingFunction6<in P1, in P2, in P3, in P4, in P5, in P6, out R> extends Functio… 49 export interface ThrowingFunction7<in P1, in P2, in P3, in P4, in P5, in P6, in P7, out R> extends … 53 …owingFunction8<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, out R> extends Function<R> { 57 …nction9<in P1, in P2, in P3, in P4, in P5, in P6, in P7, in P8, in P9, out R> extends Function<R> { [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 | access_modifier_over.params.yaml | 19 class Derived extends Base { 37 class Derived extends Base { 47 class Derived extends Base { 65 class Derived extends Base { 83 class Derived extends Base { 101 class Derived extends Base { 111 class Derived extends Base { 119 class Derived extends Base { 127 class Derived extends Base { 136 class Derived extends Base { [all …]
|
| /arkcompiler/ets_frontend/ets2panda/test/ast/parser/ets/ |
| D | typeinference_function_generic.sts | 16 function fn1<T extends D, D>(x: T, y: D) {} 19 function fn2<T extends D, D>(x: D, y: T) {} 22 function fn3<T, D extends T>(x: T, y: D) {} 25 function fn4<T, D extends T>(x: D, y: T) {} 28 function fn5<T extends D ,D>(x: D, y:T) {} 32 function fn6<T, F extends T, D extends F>(x:T,y:D,z:F){} 35 function fn7<T extends D, D extends T>(x:T, y:D){}
|
| /arkcompiler/ets_frontend/ets2panda/test/compiler/ets/ |
| D | union_types_merging.sts | 30 class A2 extends A1 {} 31 class A3 extends A2 {} 32 class A4 extends A3 {} 33 class A5 extends A4 {} 36 class B2 extends B1 {} 37 class B3 extends B2 {} 38 class B4 extends B3 {} 39 class B5 extends B4 {}
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/19.nullish-coalescing_expression/ |
| D | least_upper_bound.sts | 22 class CAA extends ACA {} 23 class CAB extends ACA {} 24 class CAAA extends CAA {} 25 class CAAB extends CAA {} 27 class CBA extends ACB {} 28 class CBB extends ACB {} 29 class CBBA extends CBB {} 30 class CBBB extends CBB {}
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/06.statements/02.multiple_catch_clauses_in_try_statements/ |
| D | catch.params.yaml | 18 class Ex extends Exception {} 19 class Fx extends Exception {} 36 class Ex extends Exception {} 37 class Fx extends Exception {} 54 class Ex extends Exception {} 55 class Fx extends Exception {} 74 class Ex extends Exception {} 75 class Fx extends Exception {} 92 class Ex extends Exception {} 93 class Fx extends Ex {} [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/04.casting_contexts_and_conversions/02.narrowing_reference_casting_conversions/ |
| D | userdef_ref.params.yaml | 50 class B extends A {} 57 class B extends A {} 64 class B extends A {} 71 class B extends A {} 72 class C extends B {} 94 interface J extends I {} 103 class B extends A implements I {} 111 class B extends A implements I {} 119 class B extends A implements I {} 135 class B extends A {} [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/05.generics/02.generic_instantiations/01.type_arguments/type_arguments_of_parameterized_declarations/ |
| D | constr_args1.params.yaml | 28 bound: ' extends X' 32 bound: ' extends X|null' 36 bound: ' extends Object|null' 50 bound: ' extends I' 54 bound: ' extends I|null' 58 bound: ' extends Object|null' 72 bound: ' extends X[]' 76 bound: ' extends X[]|null' 80 bound: ' extends Object|null' 84 bound: ' extends Object[]' [all …]
|