| /arkcompiler/ets_frontend/ets2panda/linter/test/main/ |
| D | array_literals.ets | 24 const a = [1, 2]; // NOW OK 25 const b: any = [3, 4]; // NOW OK 26 const c: any[] = [5, 6]; // OK 27 const d: [number, number] = [7, 8]; // NOW OK 28 const e: number[] = [9, 10]; // OK 29 const f = [1, 'x', true]; // NOW OK 30 const g: object[] = [2, 'y', false]; // OK 33 a: [1, 2], // NOW OK 34 b: [3, 4], // OK 35 c: [5, 6], // NOW OK [all …]
|
| D | structural_identity.ets | 107 fC(c); // OK 110 fC(cc); // OK 113 fI(i); // OK 114 fI(ci); // OK 116 fI(ii); // OK 117 fDC(c); // OK, assignment to dynamic 118 fDC(i); // OK, assignment to dynamic 119 fDC(ci); // OK, assignment to dynamic 120 fDC(cc); // OK, assignment to dynamic 121 fDC(ii); // OK, assignment to dynamic [all …]
|
| D | sendable_no_structural_typing.ets | 55 let b1: SC1 = new SC1(); // OK 57 let b3: SCT1<string> = new SCT1<string>(); // OK 59 let b5: SC1 | NC1 = new SC1(); // OK 61 let b7: SC1 | NC1 = new NC1(); // OK 63 let b9: SC1 | NC1 = 1 ? new SC1() : new NC1(); // OK 67 let b13: TSS<number> = new SCT1<number>(); // OK 68 let b14: TSS<number> = new SCT2<number>(); // OK 76 let b21: SCT1<number> = new SCT2<number>();// OK 77 let b22: TSN<number> = new SCT1<number>(); // OK 78 let b23: TSN<number> = new SCT2<number>(); // OK [all …]
|
| D | numeric_semantics2.ets.migrate.ets | 17 const a: number = 11.0 // NOT OK 18 const b: number = 12.0 // NOT OK 19 // NOT OK 20 const c: number = 13.0 // NOT OK 21 // NOT OK 23 const e: number = 15.0 // NOT OK 24 console.log('' + 1.0/2.0) // NOT OK 39 let x: X1 = {name: 20.0, __2: 30.0} // OK 40 console.log(x.__2); // OK 44 let x_non = {name: 20.0, 2: 20.0}; // OK [all …]
|
| D | sendable_class_interface_property.ets | 25 prop1: number; // OK 26 prop2: string; // OK 27 prop3: boolean; // OK 28 prop4: bigint; // OK 29 prop5: SendableClass3; // OK 30 prop6: null; // OK 31 prop7: undefined; // OK 32 prop8: U; // OK 33 prop9: T | number | undefined; // OK 34 prop10: alias0; // OK [all …]
|
| D | object_literals.ets | 35 let a1 = { a: 1, b: 'a' }; // NOT OK 36 let a2: any = { a: 2, b: 'b' }; // OK - ASSIGNMENT TO ANY 37 let a3: { a: number; b: string } = { a: 30, b: 'c' }; // NOT OK 38 let a4: I = { a: 4, b: 'd' }; // OK 39 let a5: C = { a: 5, b: 'e' }; // OK 41 // OK 42 q: { x: 6, y: 'f' }, // NOT OK 43 w: { a: 7, b: 'g' }, // OK - ASSIGNMENT TO ANY 44 e: { a: 8, b: 'h' }, // OK 45 r: { a: 9, b: 'i' }, // OK [all …]
|
| D | numeric_semantics2.ets | 17 const a: number = 11 // NOT OK 18 const b = 12 // NOT OK 19 const c = 13.0 // NOT OK 21 const e: number = 15 // NOT OK 22 console.log('' + 1/2) // NOT OK 37 let x: X1 = {"name": 20.0, 2: 30.0} // OK 38 console.log(x[2]); // OK 42 let x_non = {name: 20.0, 2: 20.0}; // OK 77 const a1 = `${1/2}` // NOT OK 79 const b1 = `20${20 | 21 | 22 | 23}` // NOT OK [all …]
|
| D | object_literals.ets.migrate.ets | 47 let a1: GeneratedObjectLiteralInterface_1 = { a: 1, b: 'a' }; // NOT OK 48 let a2: any = { a: 2, b: 'b' }; // OK - ASSIGNMENT TO ANY 49 let a3: GeneratedTypeLiteralInterface_2 = { a: 30, b: 'c' }; // NOT OK 50 let a4: I = { a: 4, b: 'd' }; // OK 51 let a5: C = { a: 5, b: 'e' }; // OK 53 // OK 54 q: { x: 6, y: 'f' }, // NOT OK 55 w: { a: 7, b: 'g' }, // OK - ASSIGNMENT TO ANY 56 e: { a: 8, b: 'h' }, // OK 57 r: { a: 9, b: 'i' }, // OK [all …]
|
| D | sendable_function.ets.migrate.ets | 26 function sf():void {} // OK 30 } // OK 38 function sf3():void; // OK 66 type Sft = () => void; // OK 68 type Sft2<T> = () => void; // OK 70 type Sft3 = <T>(p:T) => T; // OK 93 const a1:Sft = sf; // OK 95 const a3:Sc = new Sc(); // OK 98 const b1:D_Sft = D_sf; // OK 99 const b2:D_Nft = D_nf; // OK [all …]
|
| D | sendable_function.ets | 26 function sf():void {} // OK 30 } // OK 38 function sf3():void; // OK 65 type Sft = () => void; // OK 67 type Sft2<T> = () => void; // OK 69 type Sft3 = <T>(p:T) => T; // OK 92 const a1:Sft = sf; // OK 94 const a3:Sc = new Sc(); // OK 97 const b1:D_Sft = D_sf; // OK 98 const b2:D_Nft = D_nf; // OK [all …]
|
| D | interface_literal_prop_name.ets | 24 '3': string, // OK v1.1 rule relax case 25 [E.str]: string; // OK v1.1 rule relax case 31 '3': 'i3', // OK v1.1 32 [E.str]: 'e5' // OK v1.1 37 '3': 'i3', // OK v1.1 38 'e5': 'e5' // OK v1.1 44 public '4': string = 'c4'; // OK v1.1 rule relax case 45 public [E.str]: string = 'e5'; // OK v1.1 rule relax case 51 '4': 'c4', // OK v1.1 52 'e5': 'e5' // OK v1.1 [all …]
|
| D | shared_module.ets | 20 export const enum A{a, b} // ok, const enum is sendable type 22 export let var1: number | A; // ok, union type of const enum and number 27 export class D{} // ok, sendable class is sendable type 31 export interface F extends lang.ISendable{} // ok, interface extends ISendable is sendable type; 34 export {ff}; // ok 39 export {var5}; // ok 43 export default III; // ok 44 export {a} from './shared_module_sendable_export'; // ok 48 export let var8 = var7; // ok, no explicit type, the inferred type of var8 is string 50 export class A{} // ok, exports from namespace are not checked [all …]
|
| D | destructuring_declarations.ets | 17 let { a, b, c } = { a: 100, b: 200, c: 'bar' }; // NOT OK 18 let { a2, ...rest2 } = { a2: 1, b2: 2 }; // NOT OK 19 let { a3, b3: { c3, d3: e3 } } = { a3: 1, b3: { c3: 3, d3: 'baz' }}; // NOT OK 20 let { a4, b4: { ...rest4 } } = { a4: 1, b4: { c4: 3, d4: 'bah' }}; // NOT OK 22 let { a, b, c } = {}; // NOT OK, not fixable 27 let { a5, b5 } = getObject(); // NOT OK 31 const [a7, b7, ...rest7] = [10, 20, 30, 40, 50]; // NOT OK 33 const [a9, b9, [c9, ...rest9]] = [10, 20, [30, 40, 50]]; // NOT OK 40 let [a11, ...rest11] = tuple; // NOT OK 46 let [a13, b13, c13] = set; // NOT OK [all …]
|
| D | destructuring_assignments.ets | 19 ({ a, b, s } = { a: 100, b: 200, s: 'bar' }); // NOT OK 20 ({ a, b, s } = {}); // NOT OK, not fixable 21 ({ a, ...rest } = { a: 1, b: 2 }); // NOT OK 22 ({ a, b: { c, d: s } } = { a: 1, b: { c: 3, d: 'baz' }}); // NOT OK 23 ({ a, b: { ...rest } } = { a: 1, b: { c: 3, d: 'bah' }}); // NOT OK 28 ({ a, b } = getObject()); // NOT OK 35 [a, b, ...rest] = [10, 20, 30, 40, 50]; // NOT OK 37 [a, b, [c, ...rest]] = [10, 20, [30, 40, 50]]; // NOT OK 41 [a, ...rest] = tuple; // NOT OK 47 [a, b, c] = set; // NOT OK [all …]
|
| D | numeric_semantics.ets | 20 a = 1; // OK 23 a += 1; // OK 26 console.log(a + 1); // OK 27 console.log(a - 0.5); // OK 29 console.log(a / 2.5); // OK 31 console.log(2.5 / a); // OK 36 console.log(a + b); // OK 37 console.log(a / b); // OK 42 console.log(a + c); // OK 43 console.log(a / c); // OK [all …]
|
| D | arkts_no_duplicate_function_name3.ets | 17 function foo(x: number): void; // OK, but have arkts-no-ts-overload 18 function foo(x: string): void; // OK, but have arkts-no-ts-overload 19 function foo(x: boolean): void {} // OK, but have arkts-no-ts-overload 23 class MyClass {} // OK 31 let myVar: number = 42; // OK 39 let y: number = 1, z: number = 2; // OK 43 interface MyInterface {} // OK 51 enum MyEnum { A, B, C } // OK 59 let a: number = 1, b: number = 2; // OK 63 let c: number = 3, d: number = 4; // OK
|
| D | numeric_semantics.ets.migrate.ets | 30 a = 1.0; // OK 33 a += 1.0; // OK 36 console.log(a + 1.0); // OK 37 console.log(a - 0.5); // OK 39 console.log(a / 2.5); // OK 41 console.log(2.5 / a); // OK 46 console.log(a + b); // OK 47 console.log(a / b); // OK 52 console.log(a + c); // OK 53 console.log(a / c); // OK [all …]
|
| D | sendable_class_inheritance.ets.migrate.ets | 77 class sendableClass5 extends sendableClassA {} // OK 86 class sendableClass7 extends localSendableClassA {} // OK 97 class sendableClass9 implements localSendableInterface {} // OK 101 class sendableClass10 implements localNonSendableInterface {} // OK 106 class sendableClass11 implements sendableInterface {} // OK 110 class sendableClass12 implements nonSendableInterface {} // OK 115 class sendableClass13 implements localSendableInterfaceAlias {} // OK 119 class sendableClass14 implements localNonSendableInterfaceAlias {} // OK 128 class sendableClass16 extends nonSendableVar {} // OK 135 class sendableClass18 extends localNonSendableVar {} // OK [all …]
|
| D | sendable_class_inheritance.ets | 77 class sendableClass5 extends sendableClassA {} // OK 86 class sendableClass7 extends localSendableClassA {} // OK 97 class sendableClass9 implements localSendableInterface {} // OK 101 class sendableClass10 implements localNonSendableInterface {} // OK 106 class sendableClass11 implements sendableInterface {} // OK 110 class sendableClass12 implements nonSendableInterface {} // OK 115 class sendableClass13 implements localSendableInterfaceAlias {} // OK 119 class sendableClass14 implements localNonSendableInterfaceAlias {} // OK 128 class sendableClass16 extends nonSendableVar {} // OK 135 class sendableClass18 extends localNonSendableVar {} // OK [all …]
|
| D | destructuring_assignments.ets.migrate.ets | 28 // NOT OK 29 ({ a, b, s } = {}); // NOT OK, not fixable 30 ({ a, ...rest } = { a: 1, b: 2 }); // NOT OK 45 // NOT OK 46 ({ a, b: { ...rest } } = { a: 1, b: { c: 3, d: 'bah' }}); // NOT OK 58 // NOT OK 82 [a, b, ...rest] = [10, 20, 30, 40, 50]; // NOT OK 84 [a, b, [c, ...rest]] = [10, 20, [30, 40, 50]]; // NOT OK 88 [a, ...rest] = tuple; // NOT OK 97 [a, b, c] = set; // NOT OK [all …]
|
| D | destructuring_declarations.ets.migrate.ets | 26 // NOT OK 27 let { a2, ...rest2 } = { a2: 1, b2: 2 }; // NOT OK 42 // NOT OK 43 let { a4, b4: { ...rest4 } } = { a4: 1, b4: { c4: 3, d4: 'bah' }}; // NOT OK 45 let { a, b, c } = {}; // NOT OK, not fixable 57 // NOT OK 65 const [a7, b7, ...rest7] = [10, 20, 30, 40, 50]; // NOT OK 67 const [a9, b9, [c9, ...rest9]] = [10, 20, [30, 40, 50]]; // NOT OK 97 let [a11, ...rest11] = tuple; // NOT OK 106 let [a13, b13, c13] = set; // NOT OK [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/04.names_declarations_and_scopes/06.type_declarations/01.type_alias_declaration/ |
| D | alias_gen.params.yaml | 21 let ok = v(1).unboxed() == 1; 28 let ok = v(1).unboxed() == 1; 35 let ok = v === null; 43 let ok = v(42) == 'a42' 51 let ok = v(42.0) == 'a42' 58 let ok = v[0](1).unboxed() == 1; 65 let ok = v[0](1).unboxed() == 1; 70 public ok = true; 75 let ok: boolean = v.ok; 79 public ok = true; [all …]
|
| /arkcompiler/ets_runtime/test/moduletest/fortest/ |
| D | expect_output.txt | 66 Error: OK 67 Error: OK 68 Error: OK 69 Error: OK 70 Error: OK 71 Error: OK 72 Error: OK 73 Error: OK 74 Error: OK 75 Error: OK [all …]
|
| /arkcompiler/runtime_core/static_core/verification/ |
| D | verification.yaml | 16 ok: 17 ok: "" 76 _default: ok 91 _default: ok 108 _default: ok 116 _default: ok 134 _default: ok 152 _default: ok 168 _default: ok 184 _default: ok [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates_deprecated/02.multiple_catch_clauses_in_try_statements/ |
| D | finally.params.yaml | 75 let ok = false; 81 ok = ret == 1100; 83 return ok ? 0 : 1; 103 let ok = false; 110 ok = ret == 1100 && t1 == t1_orig; 112 return ok ? 0 : 1; 134 let ok = false; 140 ok = ret == 1100; 142 return ok ? 0 : 1; 164 let ok = false; [all …]
|