/arkcompiler/ets_runtime/test/typeinfer/automatedcases/ |
D | binaryArithmeticControlFlowGraphNotTooLarge.ts | 25 …d, ab, bc, cd, da, blocks = this.blocks; if (this.first) { a = blocks[0] - 1; a =… 28 let a, b, c, d, ab, bc, cd, da, blocks = this.blocks; 32 AssertType(d, "any"); 67 d = ((a & 0xefcdab89) | (~a & 0x98badcfe)) + blocks[1] + 271733878; 68 AssertType(d = ((a & 0xefcdab89) | (~a & 0x98badcfe)) + blocks[1] + 271733878, "any"); 69 AssertType(d, "any"); 88 d = (d << 7) | (d >>> 25); 89 AssertType(d = (d << 7) | (d >>> 25), "number"); 90 AssertType(d, "any"); 91 AssertType((d << 7) | (d >>> 25), "number"); [all …]
|
D | fixingTypeParametersRepeatedly3.ts | 32 let result = foo(derived, d => d.toBase()); 34 AssertType(foo(derived, d => d.toBase()), "Derived"); 37 AssertType(d => d.toBase(), "(Derived) => Base"); 38 AssertType(d, "Derived"); 39 AssertType(d.toBase(), "Base"); 40 AssertType(d.toBase, "() => Base"); 46 let result2 = bar(derived, d => d.toBase()); 48 AssertType(bar(derived, d => d.toBase()), "Base"); 51 AssertType(d => d.toBase(), "(Derived) => Base"); 52 AssertType(d, "Derived"); [all …]
|
D | classWithProtectedProperty.ts | 32 protected d = () => ''; 45 let d = new D(); 46 AssertType(d, "D"); 50 let r1: string = d.x; 52 AssertType(d.x, "any"); 54 let r2: string = d.a; 56 AssertType(d.a, "string"); 58 let r3: string = d.b; 60 AssertType(d.b, "string"); 62 let r4: string = d.c(); [all …]
|
D | logicalAssignment11targetes2020.ts | 24 let d: string | undefined; 25 AssertType(d, "union"); 27 d ?? (d = x ?? "x") 28 AssertType(d ?? (d = x ?? "x"), "string"); 29 AssertType(d, "union"); 30 AssertType((d = x ?? "x"), "string"); 31 AssertType(d = x ?? "x", "string"); 32 AssertType(d, "union"); 37 d.length; 38 AssertType(d.length, "number");
|
D | logicalAssignment11targetes2015.ts | 24 let d: string | undefined; 25 AssertType(d, "union"); 27 d ?? (d = x ?? "x") 28 AssertType(d ?? (d = x ?? "x"), "string"); 29 AssertType(d, "union"); 30 AssertType((d = x ?? "x"), "string"); 31 AssertType(d = x ?? "x", "string"); 32 AssertType(d, "union"); 37 d.length; 38 AssertType(d.length, "number");
|
D | logicalAssignment11targetesnext.ts | 24 let d: string | undefined; 25 AssertType(d, "union"); 27 d ?? (d = x ?? "x") 28 AssertType(d ?? (d = x ?? "x"), "string"); 29 AssertType(d, "union"); 30 AssertType((d = x ?? "x"), "string"); 31 AssertType(d = x ?? "x", "string"); 32 AssertType(d, "union"); 37 d.length; 38 AssertType(d.length, "number");
|
D | classWithEmptyBody.ts | 63 let d: D; variable 64 AssertType(d, "D"); 66 let o: {} = d; 68 AssertType(d, "D"); 70 d = 1; 71 AssertType(d = 1, "int"); 72 AssertType(d, "D"); 75 d = { foo: '' 76 AssertType(d = { foo: '' }, "{ foo: string; }"); 78 AssertType(d, "D"); [all …]
|
D | extendAndImplementTheSameBaseType.ts | 32 let d: D = new D(); variable 33 AssertType(d, "D"); 37 d.bar(); 38 AssertType(d.bar(), "void"); 39 AssertType(d.bar, "() => void"); 41 d.baz(); 42 AssertType(d.baz(), "void"); 43 AssertType(d.baz, "() => void"); 45 d.foo; 46 AssertType(d.foo, "number");
|
D | mapOnTupleTypes02.ts | 24 AssertType(point.map(d => d + 1), "number[]"); 26 AssertType(d => d + 1, "(number) => number"); 27 AssertType(d, "number"); 28 AssertType(d + 1, "number"); 29 AssertType(d, "number"); 31 return point.map(d => d + 1);
|
D | elementAccessChain.ts | 56 declare const o4: { b?: { c: { d?: { e: string } } } }; 60 AssertType(d, "union"); 63 o4.b?.["c"].d?.e; 64 AssertType(o4.b?.["c"].d?.e, "union"); 66 o4.b?.["c"].d?.["e"]; 67 AssertType(o4.b?.["c"].d?.["e"], "union"); 68 AssertType(o4.b?.["c"].d, "union"); 71 declare const o5: { b?(): { c: { d?: { e: string } } } }; 75 AssertType(d, "union"); 78 o5.b?.()["c"].d?.e; [all …]
|
D | genericContextualTypingSpecialization.ts | 24 b.reduce<number>((c, d) => c + d, 0); // should not error on '+' 25 AssertType(b.reduce<number>((c, d) => c + d, 0), "number"); 27 AssertType((c, d) => c + d, "(number, number) => number"); 29 AssertType(d, "number"); 30 AssertType(c + d, "number"); 32 AssertType(d, "number");
|
D | derivedClassOverridesProtectedMembers2.ts | 44 protected d: (a: typeof x) => void ; variable 69 d: (a: typeof y) => void; property in Derived 90 let d: Derived = new Derived(y); variable 91 AssertType(d, "Derived"); 96 let r1 = d.a; 98 AssertType(d.a, "{ foo: string; bar: string; }"); 100 let r2 = d.b(y); 102 AssertType(d.b(y), "void"); 103 AssertType(d.b, "({ foo: string; bar: string; }) => void"); 106 let r3 = d.c; [all …]
|
D | privateNameComputedPropertyName1targetesnext.ts | 26 readonly #d: string; 37 this.#d = 'd'; 38 AssertType(this.#d = 'd', "string"); 39 AssertType(this.#d, "string"); 45 const data: Record<string, string> = { a: 'a', b: 'b', c: 'c', d: 'd', e: 'e' }; 47 AssertType({ a: 'a', b: 'b', c: 'c', d: 'd', e: 'e' }, "{ a: string; b: string; c: string; d: strin… 54 AssertType(d, "string"); 75 [this.#d]: d, 76 AssertType(this.#d, "string"); 78 AssertType(d, "string"); [all …]
|
D | privateNameComputedPropertyName1targetes2022.ts | 26 readonly #d: string; 37 this.#d = 'd'; 38 AssertType(this.#d = 'd', "string"); 39 AssertType(this.#d, "string"); 45 const data: Record<string, string> = { a: 'a', b: 'b', c: 'c', d: 'd', e: 'e' }; 47 AssertType({ a: 'a', b: 'b', c: 'c', d: 'd', e: 'e' }, "{ a: string; b: string; c: string; d: strin… 54 AssertType(d, "string"); 75 [this.#d]: d, 76 AssertType(this.#d, "string"); 78 AssertType(d, "string"); [all …]
|
D | privateNameComputedPropertyName1targetes2015.ts | 26 readonly #d: string; 37 this.#d = 'd'; 38 AssertType(this.#d = 'd', "string"); 39 AssertType(this.#d, "string"); 45 const data: Record<string, string> = { a: 'a', b: 'b', c: 'c', d: 'd', e: 'e' }; 47 AssertType({ a: 'a', b: 'b', c: 'c', d: 'd', e: 'e' }, "{ a: string; b: string; c: string; d: strin… 54 AssertType(d, "string"); 75 [this.#d]: d, 76 AssertType(this.#d, "string"); 78 AssertType(d, "string"); [all …]
|
D | namedTupleMembers.ts | 43 declare let d: [a: number, b: number]; 44 AssertType(d, "[a: number, b: number]"); 56 a = d; 57 AssertType(a = d, "[a: number, b: number]"); 59 AssertType(d, "[a: number, b: number]"); 71 b = d; 72 AssertType(b = d, "[a: number, b: number]"); 74 AssertType(d, "[a: number, b: number]"); 86 c = d; 87 AssertType(c = d, "[a: number, b: number]"); [all …]
|
D | subtypingTransitivity.ts | 35 let d: D; variable 36 AssertType(d, "D"); 41 d.x = ''; 42 AssertType(d.x = '', "string"); 43 AssertType(d.x, "string"); 46 b = d; 47 AssertType(b = d, "D"); 49 AssertType(d, "D");
|
D | hidingCallSignatures.ts | 37 let d: D; variable 38 AssertType(d, "D"); 40 d(""); // number 41 AssertType(d(""), "number"); 42 AssertType(d, "D"); 45 new d(""); // should be string 46 AssertType(new d(""), "string"); 47 AssertType(d, "D");
|
D | hidingConstructSignatures.ts | 37 let d: D; variable 38 AssertType(d, "D"); 40 d(""); // string 41 AssertType(d(""), "string"); 42 AssertType(d, "D"); 45 new d(""); // should be number 46 AssertType(new d(""), "number"); 47 AssertType(d, "D");
|
D | declarationEmitPromise.ts | 26 a: bluebird<A>, b?: bluebird<B>, c?: bluebird<C>, d?: bluebird<D>, e?: bluebird<E>) { 27 let result = await (bluebird.all as any)([a, b, c, d, e].filter(el => !!el)); 29 AssertType(await (bluebird.all as any)([a, b, c, d, e].filter(el => !!el)), "any"); 30 AssertType((bluebird.all as any)([a, b, c, d, e].filter(el => !!el)), "any"); 34 AssertType([a, b, c, d, e].filter(el => !!el), "bluebird<A>[]"); 35 AssertType([a, b, c, d, e].filter, "{ <S extends bluebird<A>>((bluebird<A>, number, bluebird<A>[]) … 36 AssertType([a, b, c, d, e], "bluebird<A>[]"); 40 AssertType(d, "bluebird<D>"); 48 let func = <T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T): T => 50 AssertType(<T>(f: (a: A, b?: B, c?: C, d?: D, e?: E) => T): T => f.apply(this, result), "<T>… [all …]
|
D | chainedAssignment2.ts | 30 let d: Date; 31 AssertType(d, "Date"); 36 a = b = c = d = e = null; 37 AssertType(a = b = c = d = e = null, "null"); 39 AssertType(b = c = d = e = null, "null"); 41 AssertType(c = d = e = null, "null"); 43 AssertType(d = e = null, "null"); 44 AssertType(d, "Date");
|
D | emitOneLineVariableDeclarationRemoveCommentsFalse.ts | 36 let d: any /*[[${something}]]*/ = {}; variable 37 AssertType(d, "any"); 44 let f = /* comment1 */ d(e); variable 46 AssertType(d(e), "any"); 47 AssertType(d, "any"); 50 let g: any = /* comment2 */ d(e); variable 52 AssertType(d(e), "any"); 53 AssertType(d, "any");
|
/arkcompiler/toolchain/tooling/test/testcases/js/ |
D | dropframe.js | 19 var d = 0; 22 d = 1; 26 d = 2; 38 var d = 1; 43 d = d * 2; 46 d = d + 1; 53 var d = 1; 58 d = d * c + b * a; 65 var d = 1; 70 d = d * (b - a); [all …]
|
/arkcompiler/ets_runtime/test/aottest/vtable/level_check/ |
D | level_check.ts | 37 let d = new D(); variable 38 foo(d); 40 d = {}; 41 foo(d); 43 d = 1; 44 foo(d); 47 d = undefined; 48 foo(d);
|
/arkcompiler/ets_runtime/test/workload/objaccess/ |
D | objaccess.js | 17 var extendStatics = function (d, b) { argument 19 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || argument 20 … function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; 21 return extendStatics(d, b); 23 return function (d, b) { argument 26 extendStatics(d, b); 27 function __() { this.constructor = d; } 28 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); class
|