Home
last modified time | relevance | path

Searched refs:c2 (Results 1 – 25 of 84) sorted by relevance

1234

/arkcompiler/ets_runtime/test/typeinfer/automatedcases/
DmethodSignaturesWithOverloads2.ts58 let c2: { variable
59 AssertType(c2, "{ func4?<T>(T): number; func4?<T>(T): string; func5?: { <T>(T): number; <T>(T): str…
82 c2.func4 = c2.func5;
83 AssertType(c2.func4 = c2.func5, "{ <T>(T): number; <T>(T): string; }");
84 AssertType(c2.func4, "{ <T>(T): number; <T>(T): string; }");
85 AssertType(c2.func5, "{ <T>(T): number; <T>(T): string; }");
87 c2.func5 = c2.func4;
88 AssertType(c2.func5 = c2.func4, "{ <T>(T): number; <T>(T): string; }");
89 AssertType(c2.func5, "{ <T>(T): number; <T>(T): string; }");
90 AssertType(c2.func4, "{ <T>(T): number; <T>(T): string; }");
DcallbacksDontShareTypes.ts34 let c2: Collection<number>; variable
35 AssertType(c2, "Collection<number>");
45 let r1a = _.map(c2, (x) => {
47 AssertType(_.map(c2, (x) => { return x.toFixed() }), "Collection<string>");
49 AssertType(c2, "Collection<number>");
56 let r1b = _.map(c2, rf1); // this line should not cause the following 2 to have errors
58 AssertType(_.map(c2, rf1), "Collection<string>");
60 AssertType(c2, "Collection<number>");
63 let r5a = _.map<number, string>(c2, (x) => {
65 AssertType(_.map<number, string>(c2, (x) => { return x.toFixed() }), "Collection<string>");
[all …]
DclassImplementsClass3.ts39 let c2: C2; variable
40 AssertType(c2, "C2");
42 c = c2;
43 AssertType(c = c2, "C2");
45 AssertType(c2, "C2");
47 c2 = c;
48 AssertType(c2 = c, "C");
49 AssertType(c2, "C2");
DgenericAndNonGenericOverload1.ts25 let c2: callable2<number>; variable
26 AssertType(c2, "callable2<number>");
28 c2<string>(1);
29 AssertType(c2<string>(1), "string");
30 AssertType(c2, "callable2<number>");
DtooFewArgumentsInGenericFunctionTypedArgument.ts30 let c2: Collection<number, string>; variable
31 AssertType(c2, "Collection<number, string>");
36 let r1a = _.map(c2, (x) => {
38 AssertType(_.map(c2, (x) => { return x.toFixed() }), "Collection<number, string>");
40 AssertType(c2, "Collection<number, string>");
55 let r1b = _.map(c2, rf1);
57 AssertType(_.map(c2, rf1), "Collection<number, string>");
59 AssertType(c2, "Collection<number, string>");
DliteralTypeWidening.ts32 const c2 = c1; // Widening type "hello" constant
33 AssertType(c2, "string");
36 let v2 = c2; // Type string
38 AssertType(c2, "string");
65 const c2: "foo" | "bar" = c1; // "foo" | "bar" constant
66 AssertType(c2, "union");
69 const c3 = cond ? c1 : c2; // "foo" | "bar"
71 AssertType(cond ? c1 : c2, "union");
74 AssertType(c2, "union");
91 let v2 = c2; // "foo" | "bar"
[all …]
DtypeGuardOfFormInstanceOfOnInterface.ts53 let c2: C2; variable
54 AssertType(c2, "C2");
71 num = c1Orc2 instanceof c2 && c1Orc2.p2; // C2
72 AssertType(num = c1Orc2 instanceof c2 && c1Orc2.p2, "number");
74 AssertType(c1Orc2 instanceof c2 && c1Orc2.p2, "number");
75 AssertType(c1Orc2 instanceof c2, "boolean");
77 AssertType(c2, "C2");
101 num = c2Ord1 instanceof c2 && c2Ord1.p2; // C2
102 AssertType(num = c2Ord1 instanceof c2 && c2Ord1.p2, "number");
104 AssertType(c2Ord1 instanceof c2 && c2Ord1.p2, "number");
[all …]
Des6ModuleClassDeclaration.ts37 class c2 { class
57 new c2();
58 AssertType(new c2(), "c2");
59 AssertType(c2, "typeof c2");
95 new c2();
133 new c2();
DanyInferenceAnonymousFunctions.ts72 paired.map(function (c2) {
73 AssertType(paired.map(function (c2) { return c2.count; }), "any[]");
75 AssertType(function (c2) { return c2.count; }, "(any) => any");
76 AssertType(c2, "any");
77 AssertType(c2.count, "any");
78 return c2.count; });
DfunctionLiterals.ts152 let c2: { variable
153 AssertType(c2, "{ func4<T>(T): number; func4<T>(T): string; func5: { <T>(T): number; <T>(T): string…
176 c2.func4 = c2.func5;
177 AssertType(c2.func4 = c2.func5, "{ <T>(T): number; <T>(T): string; }");
178 AssertType(c2.func4, "{ <T>(T): number; <T>(T): string; }");
179 AssertType(c2.func5, "{ <T>(T): number; <T>(T): string; }");
181 c2.func5 = c2.func4;
182 AssertType(c2.func5 = c2.func4, "{ <T>(T): number; <T>(T): string; }");
183 AssertType(c2.func5, "{ <T>(T): number; <T>(T): string; }");
184 AssertType(c2.func4, "{ <T>(T): number; <T>(T): string; }");
DprivacyInterface.ts36 (c2: number): C2_private;
41 new (c2: number): C2_private;
63 (c2: number): C2_private;
68 new (c2: number): C2_private;
102 (c2: number): C2_private;
107 new (c2: number): C2_private;
129 (c2: number): C2_private;
134 new (c2: number): C2_private;
166 (c2: number): C6_private;
171 new (c2: number): C6_private;
[all …]
DmissingSelf.ts58 let c2 = new CalcButton2(); variable
59 AssertType(c2, "CalcButton2");
63 c2.b();
64 AssertType(c2.b(), "void");
65 AssertType(c2.b, "() => void");
DunionOfFunctionAndSignatureIsCallable.ts21 function f1(c1: Function, c2: () => object, callable: typeof c1 | typeof c2) {
27 const b = c2();
29 AssertType(c2(), "object");
30 AssertType(c2, "() => object");
DinstanceMemberInitialization.ts35 let c2 = new C(); variable
36 AssertType(c2, "C");
40 let r = c.x === c2.x;
42 AssertType(c.x === c2.x, "boolean");
44 AssertType(c2.x, "number");
DcommentsClass.ts22 class c2 {
24 let i2 = new c2();
26 AssertType(new c2(), "c2");
27 AssertType(c2, "typeof c2");
29 let i2_c = c2;
31 AssertType(c2, "typeof c2");
DcommentsInheritance.ts79 class c2 { class
123 class c3 extends c2 {
148 let c2_i = new c2(10);
150 AssertType(new c2(10), "c2");
151 AssertType(c2, "typeof c2");
165 class c4 extends c2 {
DunionAndIntersectionInference2.ts77 let c2: string & { name: string } & number; variable
78 AssertType(c2, "never");
96 f2(c2); // never
97 AssertType(f2(c2), "never");
99 AssertType(c2, "never");
DstaticPrototypePropertyOnClass.ts23 class c2<T> { class
39 let b = c2;
41 AssertType(c2, "typeof c2");
DcommentsOverloads.ts196 class c2 { class
246 let c2_i_1 = new c2(10);
248 AssertType(new c2(10), "c2");
249 AssertType(c2, "typeof c2");
252 let c2_i_2 = new c2("hello");
254 AssertType(new c2("hello"), "c2");
255 AssertType(c2, "typeof c2");
DarrayOfFunctionTypes3.ts103 let c2: { (x: number): number; <T>(x: T): any; }; variable
104 AssertType(c2, "{ (number): number; <T>(T): any; }");
108 let z2 = [a2, b2, c2]; variable
110 AssertType([a2, b2, c2], "{ (number): number; <T>(T): any; }[]");
113 AssertType(c2, "{ (number): number; <T>(T): any; }");
DtypeResolution.ts143 let c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3();
144 AssertType(c2, "TopLevelModule2.SubModule3.ClassA");
147 AssertType(c2.AisIn2_3(), "void");
148 AssertType(c2.AisIn2_3, "() => void");
191 let c2: TopLevelModule2.SubModule3.ClassA; c2.AisIn2_3();
192 AssertType(c2, "TopLevelModule2.SubModule3.ClassA");
195 AssertType(c2.AisIn2_3(), "void");
196 AssertType(c2.AisIn2_3, "() => void");
DprivacyGloInterface.ts36 (c2: number): C2_private;
41 new (c2: number): C2_private;
63 (c2: number): C2_private;
68 new (c2: number): C2_private;
DliteralTypes2.ts107 const c2 = -123; constant
108 AssertType(c2, "int");
201 const c2 = cond ? 1 : "two"; constant
202 AssertType(c2, "union");
259 let x2 = c2;
261 AssertType(c2, "union");
298 readonly c2 = -123; property in C1
316 const c2: { a : 0 | 1, b: "foo" | "bar" } = { a: 1, b: "foo" }; constant
317 AssertType(c2, "{ a: union; b: union; }");
352 const c2: (1 | "foo")[] = [1, "foo"]; constant
[all …]
DambientConstLiterals.ts32 const c2 = 123; constant
33 AssertType(c2, "int");
40 const c4 = c2;
42 AssertType(c2, "int");
/arkcompiler/runtime_core/libpandabase/utils/
Dutf.cpp235 uint32_t c2; in CompareMUtf8ToMUtf8() local
241 c2 = *mutf8_2; in CompareMUtf8ToMUtf8()
243 if (c1 == 0 && c2 == 0) { in CompareMUtf8ToMUtf8()
247 if (c1 == 0 && c2 != 0) { in CompareMUtf8ToMUtf8()
251 if (c1 != 0 && c2 == 0) { in CompareMUtf8ToMUtf8()
256 std::tie(c2, n2) = ConvertMUtf8ToUtf16Pair(mutf8_2); in CompareMUtf8ToMUtf8()
260 } while (c1 == c2); in CompareMUtf8ToMUtf8()
263 auto [c2p1, c2p2] = SplitUtf16Pair(c2); in CompareMUtf8ToMUtf8()
277 uint32_t c2; in CompareUtf8ToUtf8() local
298 c2 = *utf8_2; in CompareUtf8ToUtf8()
[all …]

1234