/arkcompiler/ets_runtime/test/typeinfer/automatedcases/ |
D | privateStaticNameShadowing.ts | 21 class X { 22 static #f = X.#m(); 24 X.#m(); 25 AssertType(X.#m(), "number"); 26 AssertType(X.#m, "() => number"); 29 const X: any = {}; // shadow the class constant 30 AssertType(X, "any"); 37 X.#m(); // Should check with X as the receiver with _b as the class constructor 38 AssertType(X.#m(), "any"); 39 AssertType(X.#m, "any");
|
D | controlFlowInstanceofExtendsFunction.ts | 36 class X { class 52 console.log(X.now()) // works as expected 53 AssertType(console.log(X.now()), "void"); 55 AssertType(X.now(), "{}"); 56 AssertType(X.now, "() => {}"); 64 export const x: X | number = Math.random() > 0.5 ? new X() : 1 66 AssertType(Math.random() > 0.5 ? new X() : 1, "union"); 71 AssertType(new X(), "X"); 72 AssertType(X, "typeof X"); 75 if (x instanceof X) {
|
D | genericClassWithObjectTypeArgsAndConstraints.ts | 33 class X<T> { class 39 foo<T extends { x: string }>(t: X<T>, t2: X<T>) { 48 let c1 = new X<C>(); 49 let d1 = new X<D>(); 55 foo2<T extends C>(t: X<T>, t2: X<T>) { 70 foo<T extends { x: string }>(t: X<T>, t2: X<T>): T; 73 let c1 = new X<C>(); 74 let d1 = new X<D>(); 80 foo2<T extends C>(t: X<T>, t2: X<T>): T;
|
D | systemModuleConstEnumsSeparateCompilation.ts | 22 const enum TopLevelConstEnum { X } 25 use(TopLevelConstEnum.X); 26 AssertType(use(TopLevelConstEnum.X), "any"); 28 AssertType(TopLevelConstEnum.X, "TopLevelConstEnum"); 30 use(M.NonTopLevelConstEnum.X); 31 AssertType(use(M.NonTopLevelConstEnum.X), "any"); 33 AssertType(M.NonTopLevelConstEnum.X, "M.NonTopLevelConstEnum"); 38 export const enum NonTopLevelConstEnum { X } enumerator
|
D | systemModuleConstEnums.ts | 22 const enum TopLevelConstEnum { X } 25 use(TopLevelConstEnum.X); 26 AssertType(use(TopLevelConstEnum.X), "any"); 28 AssertType(TopLevelConstEnum.X, "TopLevelConstEnum"); 30 use(M.NonTopLevelConstEnum.X); 31 AssertType(use(M.NonTopLevelConstEnum.X), "any"); 33 AssertType(M.NonTopLevelConstEnum.X, "M.NonTopLevelConstEnum"); 38 export const enum NonTopLevelConstEnum { X } enumerator
|
D | typeParameterUsedAsTypeParameterConstraint2.ts | 28 function baz<X extends W, Y extends V>(a: X, b: Y): T { 48 function baz<X extends W, Y extends V>(a: X, b: Y): T { 68 …n bar<V extends T, W extends U>() { let g = function <X extends W, Y extends V>(a: X, b: Y)… 73 let g = function <X extends W, Y extends V>(a: X, b: Y): T { 77 AssertType(function <X extends W, Y extends V>(a: X, b: Y): T { x = y; return… 94 …ar<V extends T, W extends U>() { let g = function baz<X extends W, Y extends V>(a: X, b: Y)… 99 let g = function baz<X extends W, Y extends V>(a: X, b: Y): T { 104 AssertType(function baz<X extends W, Y extends V>(a: X, b: Y): T { x = y; ret… 121 … function bar<V extends T, W extends U>() { let g = <X extends W, Y extends V>(a: X, b: Y)… 126 let g = <X extends W, Y extends V>(a: X, b: Y): T => { [all …]
|
D | simpleArrowFunctionParameterReferencedInObjectLiteral1.ts | 21 [].map(() => [].map(p => ({ X: p }))); 22 AssertType([].map(() => [].map(p => ({ X: p }))), "{ X: any; }[][]"); 24 AssertType(() => [].map(p => ({ X: p })), "() => { X: any; }[]"); 25 AssertType([].map(p => ({ X: p })), "{ X: any; }[]"); 27 AssertType(p => ({ X: p }), "(any) => { X: any; }"); 29 AssertType(({ X: p }), "{ X: any; }"); 30 AssertType({ X: p }, "{ X: any; }"); 31 AssertType(X, "any");
|
D | genericCallWithObjectTypeArgsAndConstraints.ts | 33 class X<T> { class 37 function foo<T extends { x: string }>(t: X<T>, t2: X<T>) { 45 let c1 = new X<C>(); 47 AssertType(new X<C>(), "X<C>"); 48 AssertType(X, "typeof X"); 50 let d1 = new X<D>(); 52 AssertType(new X<D>(), "X<D>"); 53 AssertType(X, "typeof X"); 69 function foo2<T extends C>(t: X<T>, t2: X<T>) {
|
D | declarationEmitNameConflicts2.ts | 22 module X.Y.base { 31 module X.Y.base.Z { 32 export let f = X.Y.base.f; // Should be base.f 33 export let C = X.Y.base.C; // Should be base.C 34 export let M = X.Y.base.M; // Should be base.M 35 export let E = X.Y.base.E; // Should be base.E
|
D | intersectionTypeNormalization.ts | 40 interface X { x: string } interface 44 type Y1 = (A | X & Y) & (C | D); 45 type Y2 = A & (C | D) | X & Y & (C | D) 46 type Y3 = A & C | A & D | X & Y & C | X & Y & D; 61 type Z1 = (A | X & (M | N)) & (C | D); 62 type Z2 = A & (C | D) | X & (M | N) & (C | D) 63 type Z3 = A & C | A & D | X & (M | N) & C | X & (M | N) & D; 64 type Z4 = A & C | A & D | X & M & C | X & N & C | X & M & D | X & N & D;
|
D | namespaces1.ts | 21 module X { 28 let x: X.Y.Z; 30 AssertType(X, "any"); 33 let x2: X.Y; 35 AssertType(X, "any");
|
D | moduleAndInterfaceSharingName.ts | 21 module X { 27 let z: X.Y.Z = null; 29 AssertType(X, "any"); 33 let z2: X.Y; 35 AssertType(X, "any");
|
D | moduleAndInterfaceSharingName3.ts | 21 module X { 27 let z: X.Y.Z = null; 29 AssertType(X, "any"); 33 let z2: X.Y<string>; 35 AssertType(X, "any");
|
D | nestedModules.ts | 34 module M2.X { 41 export module X { 46 let m = M2.X; 48 AssertType(M2.X, "typeof M2.X"); 65 let p: M2.X.Point; 68 AssertType(X, "any");
|
D | declarationEmitLocalClassHasRequiredDeclare.ts | 23 namespace X { } 26 class X { } class 29 static X = X; property in A
|
D | anonymousClassDeclarationDoesntPrintWithReadonly.ts | 21 export class X { 26 AssertType(class extends X { }, "typeof (Anonymous class)"); 27 return class extends X { 29 AssertType(X, "X");
|
D | exportSpecifierAndExportedMemberDeclaration.ts | 23 export module X { 27 export { Y as X }; 28 function Z(): X.I; 32 function Z2(): X.I;
|
D | importOnAliasedIdentifiers.ts | 23 export interface X { s: string } 24 export let X: X; 29 import Z = A.X; // Alias for both type and member A.X
|
D | identicalGenericConditionalsWithInferRelated.ts | 21 function f<X>(arg: X) { 22 type Cond1 = X extends [infer A] ? A : never; 25 type Cond2 = X extends [infer A] ? A : never; 58 interface X { interface 62 class Y implements X {
|
D | declFileWithInternalModuleNameConflictsInExtendsClause3.ts | 22 module X.A.C { 26 module X.A.B.C { 27 export class W implements X.A.C.Z { // This needs to be referred as X.A.C.Z as A has conflict 31 module X.A.B.C {
|
D | controlFlowOptionalChain2.ts | 70 type X = { kind: 'X', x: 'x' } alias 72 function f1(x: X | U | undefined) { 87 function f2(x: X | N | undefined) { 102 function f3(x: X | U | null) { 117 function f4(x: X | N | null) { 132 function f5(x: X | U | undefined) { 147 function f6(x: X | N | undefined) { 162 function f7(x: X | U | null) { 177 function f8(x: X | N | null) {
|
D | covariance1.ts | 24 interface X { m1:number; } 25 export class XX implements X { constructor(public m1:number) { } } 27 interface Y { x:X; } 31 let a:X;
|
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/symbolMergeValueAndImportedType/ |
D | main.ts | 21 import { X } from "./other"; 22 const X = 42; constant 23 AssertType(X, "int"); 26 console.log('X is ' + X); 27 AssertType(console.log('X is ' + X), "void"); 29 AssertType('X is ' + X, "string"); 31 AssertType(X, "int");
|
/arkcompiler/runtime_core/libpandabase/utils/ |
D | math_helpers.h | 34 constexpr uint32_t GetIntLog2(const uint32_t X) in GetIntLog2() argument 36 ASSERT((X > 0) && !(X & (X - 1U))); in GetIntLog2() 37 return static_cast<uint32_t>(panda_bit_utils_ctz(X)); in GetIntLog2() 45 constexpr uint64_t GetIntLog2(const uint64_t X) in GetIntLog2() argument 47 ASSERT((X > 0) && !(X & (X - 1U))); in GetIntLog2() 48 return static_cast<uint64_t>(panda_bit_utils_ctzll(X)); in GetIntLog2()
|
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/constAssertionOnEnum/ |
D | more.ts | 21 export enum Foo { X } 22 (Foo).X as const; 23 AssertType((Foo).X as const, "Foo"); 24 AssertType((Foo).X, "Foo");
|