/arkcompiler/ets_runtime/test/typeinfer/automatedcases/ |
D | mergedDeclarations1.ts | 35 export function equals(p1: Point, p2: Point) { 36 AssertType(p1.x == p2.x && p1.y == p2.y, "boolean"); 37 AssertType(p1.x == p2.x, "boolean"); 39 AssertType(p2.x, "number"); 40 AssertType(p1.y == p2.y, "boolean"); 42 AssertType(p2.y, "number"); 43 return p1.x == p2.x && p1.y == p2.y; 53 let p2 = point.origin; variable 54 AssertType(p2, "Point"); 57 let b = point.equals(p1, p2); [all …]
|
D | jsdocLiteral.ts | 28 function f(p1, p2, p3, p4, p5) { 29 AssertType(p1 + p2 + p3 + p4 + p5 + '.', "string"); 30 AssertType(p1 + p2 + p3 + p4 + p5, "string"); 31 AssertType(p1 + p2 + p3 + p4, "string"); 32 AssertType(p1 + p2 + p3, "string"); 33 AssertType(p1 + p2, "string"); 35 AssertType(p2, "string"); 40 return p1 + p2 + p3 + p4 + p5 + '.';
|
D | jsDeclarationsReusesExistingTypeAnnotations.ts | 26 p2 = undefined; 43 get p2() { method in С2 79 get p2() { method in С3 85 set p2(value) { method in С3 86 this.p2 = value; 87 AssertType(this.p2 = value, "union"); 88 AssertType(this.p2, "union"); 136 set p2(value) { method in С4 137 this.p2 = value; 138 AssertType(this.p2 = value, "union"); [all …]
|
D | emptyVariableDeclarationBindingPatterns01_ES5.ts | 22 … const {} = a, [] = a; let { p1: {}, p2: [] } = a; let { p1: {}, p2: [] } = a; const {… 23 … const {} = a, [] = a; let { p1: {}, p2: [] } = a; let { p1: {}, p2: [] } = a; const {… 24 … const {} = a, [] = a; let { p1: {}, p2: [] } = a; let { p1: {}, p2: [] } = a; const {… 59 let { p1: {}, p2: [] } = a; 61 AssertType(p2, "any"); 64 let { p1: {}, p2: [] } = a; 66 AssertType(p2, "any"); 69 const { p1: {}, p2: [] } = a; 71 AssertType(p2, "any");
|
D | emptyVariableDeclarationBindingPatterns01_ES5iterable.ts | 22 … const {} = a, [] = a; let { p1: {}, p2: [] } = a; let { p1: {}, p2: [] } = a; const {… 23 … const {} = a, [] = a; let { p1: {}, p2: [] } = a; let { p1: {}, p2: [] } = a; const {… 24 … const {} = a, [] = a; let { p1: {}, p2: [] } = a; let { p1: {}, p2: [] } = a; const {… 59 let { p1: {}, p2: [] } = a; 61 AssertType(p2, "any"); 64 let { p1: {}, p2: [] } = a; 66 AssertType(p2, "any"); 69 const { p1: {}, p2: [] } = a; 71 AssertType(p2, "any");
|
D | emptyVariableDeclarationBindingPatterns01_ES6.ts | 22 … const {} = a, [] = a; let { p1: {}, p2: [] } = a; let { p1: {}, p2: [] } = a; const {… 23 … const {} = a, [] = a; let { p1: {}, p2: [] } = a; let { p1: {}, p2: [] } = a; const {… 24 … const {} = a, [] = a; let { p1: {}, p2: [] } = a; let { p1: {}, p2: [] } = a; const {… 59 let { p1: {}, p2: [] } = a; 61 AssertType(p2, "any"); 64 let { p1: {}, p2: [] } = a; 66 AssertType(p2, "any"); 69 const { p1: {}, p2: [] } = a; 71 AssertType(p2, "any");
|
D | typeGuardOfFormInstanceOf.ts | 31 p2: number; property in C2 60 num = ctor1 instanceof C2 && ctor1.p2; // C2 61 AssertType(num = ctor1 instanceof C2 && ctor1.p2, "number"); 63 AssertType(ctor1 instanceof C2 && ctor1.p2, "number"); 67 AssertType(ctor1.p2, "number"); 90 num = ctor2 instanceof C2 && ctor2.p2; // C2 91 AssertType(num = ctor2 instanceof C2 && ctor2.p2, "number"); 93 AssertType(ctor2 instanceof C2 && ctor2.p2, "number"); 97 AssertType(ctor2.p2, "number"); 133 ctor3.p2; // C2 [all …]
|
D | varianceRepeatedlyPropegatesWithUnreliableFlag.ts | 28 fn<K extends keyof T>(p1: P1<Pick<T, K>>, p2: P2<Pick<T, K>>): void; 36 const p2: P2<A> = null as any; constant 37 AssertType(p2, "P2<A>"); 42 i.fn(null as any, p2); 43 AssertType(i.fn(null as any, p2), "void"); 47 AssertType(p2, "P2<A>");
|
D | innerAliases2.ts | 34 let p2:provider.UsefulClass= new provider.UsefulClass(); 35 AssertType(p2, "provider.UsefulClass"); 40 AssertType(p2, "provider.UsefulClass"); 41 return p2;
|
D | typeGuardOfFormIsType.ts | 25 p2: number; property in C2 66 num = isC2(c1Orc2) && c1Orc2.p2; // C2 67 AssertType(num = isC2(c1Orc2) && c1Orc2.p2, "number"); 69 AssertType(isC2(c1Orc2) && c1Orc2.p2, "number"); 73 AssertType(c1Orc2.p2, "number"); 96 num = isC2(c2Ord1) && c2Ord1.p2; // C2 97 AssertType(num = isC2(c2Ord1) && c2Ord1.p2, "number"); 99 AssertType(isC2(c2Ord1) && c2Ord1.p2, "number"); 103 AssertType(c2Ord1.p2, "number");
|
D | equalityWithUnionTypes01.ts | 26 p2: number; property 29 let x = { p1: 10, p2: 20 }; 31 AssertType({ p1: 10, p2: 20 }, "{ p1: number; p2: number; }"); 34 AssertType(p2, "number");
|
D | jqueryInference.ts | 34 let p2 = shouldBeIdentity(p1); 35 AssertType(p2, "MyPromise<boolean, any>"); 40 let p2: MyPromise<boolean, any>; 41 AssertType(p2, "MyPromise<boolean, any>");
|
D | typeGuardOfFormInstanceOfOnInterface.ts | 35 p2: number; property 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"); 78 AssertType(c1Orc2.p2, "number"); 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"); 108 AssertType(c2Ord1.p2, "number");
|
D | promiseTest.ts | 31 let p2 = p.then(function (x) { variable 32 AssertType(p2, "Promise<number>"); 43 let x = p2.data; // number 45 AssertType(p2.data, "number");
|
D | instantiatedModule.ts | 106 let p2: { x: number; y: number variable 107 AssertType(p2, "{ x: number; y: number; }"); 114 let p2: M2.Point; variable 115 AssertType(p2, "{ x: number; y: number; }"); 118 let p2 = new m2.Point(); variable 119 AssertType(p2, "{ x: number; y: number; }"); 123 let p2 = new M2.Point(); variable 124 AssertType(p2, "{ x: number; y: number; }");
|
D | typeGuardOfFormIsTypeOnInterfaces.ts | 29 p2: number; property 81 num = isC2(c1Orc2) && c1Orc2.p2; // C2 82 AssertType(num = isC2(c1Orc2) && c1Orc2.p2, "number"); 84 AssertType(isC2(c1Orc2) && c1Orc2.p2, "number"); 88 AssertType(c1Orc2.p2, "number"); 111 num = isC2(c2Ord1) && c2Ord1.p2; // C2 112 AssertType(num = isC2(c2Ord1) && c2Ord1.p2, "number"); 114 AssertType(isC2(c2Ord1) && c2Ord1.p2, "number"); 118 AssertType(c2Ord1.p2, "number");
|
D | inferentialTypingObjectLiteralMethod2.ts | 26 AssertType(foo("", { method(p1) { return p1.length } }, { method(p2) { return undefined } }), "stri… 33 AssertType({ method(p2) { return undefined } }, "{ method(number): any; }"); 35 AssertType(p2, "number"); 37 return p1.length } }, { method(p2) { return undefined } });
|
D | varArgsOnConstructorTypes.ts | 27 private p2: string; property in B 41 this.p2 = url; 42 AssertType(this.p2 = url, "string"); 43 AssertType(this.p2, "string");
|
D | inferentialTypingObjectLiteralMethod1.ts | 26 AssertType(foo("", { method(p1) { return p1.length } }, { method(p2) { return undefined } }), "stri… 33 AssertType({ method(p2) { return undefined } }, "{ method(number): any; }"); 35 AssertType(p2, "number"); 37 return p1.length } }, { method(p2) { return undefined } });
|
D | typeGuardFunctionGenerics.ts | 38 declare function funB<T>(p1: (p1) => T, p2: any): p2 is T; 40 declare function funD<T>(p1: (p1) => p1 is T, p2: any): p2 is T; 41 declare function funE<T, U>(p1: (p1) => p1 is T, p2: U): T;
|
D | collisionCodeGenModuleWithModuleChildren.ts | 35 let p2 = new M(); variable 44 let p2 = M(); variable 53 let p2: M; variable
|
D | instanceAndStaticDeclarations1.ts | 52 static distance(p1: Point, p2: Point) { 53 AssertType(p1.distance(p2), "number"); 54 return p1.distance(p2); 58 AssertType(p2, "Point");
|
/arkcompiler/runtime_core/libpandabase/tests/ |
D | native_bytes_from_mallinfo_test.cpp | 39 void *p2[10]; in TEST() local 41 p2[i] = malloc(4 * 1024 * 1024); in TEST() 42 ASSERT_NE(p2[i], nullptr); in TEST() 57 free(p2[i]); in TEST() 58 p2[i] = nullptr; in TEST()
|
/arkcompiler/ets_runtime/test/aottest/aot_compatibility_test/prototype_base_verification/ |
D | prototype_base_verification.ts | 21 let p2; 28 p2 = A.prototype; 32 print(p1 === p2);
|
/arkcompiler/ets_runtime/test/moduletest/promise/ |
D | promise.js | 26 var p2 = Promise.resolve(2468); variable 27 var p3 = Promise.race([p1, p2]); 44 var p4 = Promise.all([p, p2]);
|