Home
last modified time | relevance | path

Searched full:ok (Results 1 – 25 of 370) sorted by relevance

12345678910>>...15

/arkcompiler/ets_frontend/ets2panda/linter/test/main/
Darray_literals.sts24 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 …]
Dstructural_identity.sts107 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 …]
Dsendable_no_structural_typing.sts55 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 …]
Dsendable_class_interface_property.sts25 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 …]
Dobject_literals.sts35 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 …]
Dsendable_function.sts26 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 …]
Ddestructuring_declarations.sts17 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 …]
Dshared_module.sts20 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 …]
Dinterface_literal_prop_name.sts24 '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 …]
Ddestructuring_assignments.sts19 ({ 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 …]
Dsendable_class_inheritance.sts77 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 …]
Dbinary_wrong_types.sts55 OK = 'ok',
83 const b31 = State.OK ^ 7;
85 const b33 = 7 & State.OK;
87 const b34 = 7 << State.OK;
89 const b36 = 7 >>> State.OK;
92 const b38 = State.OK >> 2;
109 let e1 = Const.PI + Const.E; // OK
110 let e2 = State.FAULT + State.OK; // OK
111 let e3 = "State: " + State.FAULT; // OK
112 let e4 = "Const = " + Const.PI; // OK
[all …]
Dd_ts.sts27 let intent: InsightIntent = { // OK
37 margin<string>({ top: 24, bottom: 16 }); // OK
41 windowStage.loadContent('page/1', (err, data) => {}); // OK, lambda instantiates functional interfa…
42 windowStage.loadContent2('page/1', (err, data) => {}); // OK, same as above
49 idx1[1]; // OK
50 idx1['2']; // OK
63 let typeLiteral: TypeLiteral = { // OK
69 let aescbc: AesCbcParams = { // OK, object literal conforms the interface
78 let iterRes: IteratorResult<number> = { // OK, object literal conforms the interface
Dpartial_type.sts20 function updateTodo(todo: Todo, fieldsToUpdate: Partial<Todo>) { // OK
31 let numberPartial: Partial<number> = 1; // NOT OK
32 type StringPartial = Partial<string>; // NOT OK
40 applyStyle({}); // Ok
41 applyStyle({color: 0x123456}); // Ok
45 let part: PART = {}; // Ok,
46 part = {color: 0xFFFFFF}; // Ok
Dsendable_class_decorator.sts17 @Sendable // OK
19 prop: string; // OK
21 constructor() {} // OK
23 myMethod1() {} // OK
25 myMethod2(param: string) {} // OK
27 get myProperty(): string { // OK
30 set myProperty(value: string) { // OK
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/04.names_declarations_and_scopes/06.type_declarations/01.type_alias_declaration/
Dalias_gen.params.yaml21 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 …]
Dscope.params.yaml23 let ok = true
31 let ok = true
39 let ok = true
48 let ok = v
56 let ok = true
63 let ok = v
72 let ok = true
80 let ok = true
87 let ok = true
96 let ok = v
[all …]
Dalias.params.yaml21 let ok = (v as double) == 1.1
31 let ok = v.unboxed() == 1.1
39 let ok = v1 == null && v2.unboxed() == 42.0
46 let ok = v.length == 1
52 let ok = v.length == 1;
58 let ok = v.length == 1;
65 let ok = v.length == 6;
73 let ok = v.length == 1
80 let ok = v.length == 1
90 let ok = v1 == null &&
[all …]
/arkcompiler/ets_runtime/test/moduletest/fortest/
Dexpect_output.txt66 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/
Dverification.yaml16 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/doc/interop_js/
D2_esobject.rst45 a.v // ok
46 a[index] // ok, no CTE, but RTE, no operation [] on JS side
47 a() // ok, no CTE, but RTE, no operation () on JS side
48 new a() // ok
51 let n2: number = a.v as number // ok
52 let n3: ESObject = a.v // ok
54 (a.v as number) + 1 // ok
56 let s1: ESObject = 1; // ok, implicit conversion
57 let s2: ESObject = new StaticClass() // ok, implicit conversion
58 let s3: ESObject = 1 as ESObject; // ok, explicit conversion
[all …]
D4_reference_conversions.rst39 a.val = "222"; // ok
68 a.vala = "222"; // ok
69 a.valb = "333"; // ok
117 a.newVal = 1; // ok
118 a.val = 123; // ok
144 let number = a.v as number // ok
145 a.v = 456; // ok, will modify original JS object
146 a.newfield = "hi"; // ok, will modify original JS object and create new field
147 let missedFiled = a.missedFiled as undefined; // ok
148 let number2 = a["v"] as number; // ok, will return 456
[all …]
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/06.statements/02.multiple_catch_clauses_in_try_statements/
Dfinally.params.yaml75 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 …]
/arkcompiler/ets_frontend/es2panda/test/parser/ts/
Dtest_infer-type-with-extends4.ts18 type T10<T> = T extends (infer U extends number ? 1 : 0) ? 1 : 0; // ok, parsed as conditional
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 …
29 type T18<T> = T extends { [P in keyof T as infer U extends P]: 1; } ? 1 : 0; // ok, parsed as `infe…
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/08.statements/15.try_statements/02.finally_clause/
Dfinally.params.yaml74 let ok = false;
81 ok = ret == 1100 && t1 == t1_orig;
83 return ok ? 0 : 1;
101 let ok = false;
108 ok = ret == 1010 && t1 == t1_orig;
110 return ok ? 0 : 1;
129 let ok = false;
136 ok = ret == 11010 && t1 == t1_orig;
138 return ok ? 0 : 1;
158 let ok = false;
[all …]

12345678910>>...15