/arkcompiler/ets_runtime/test/typeinfer/automatedcases/ |
D | thisTypeSyntacticContext.ts | 24 const o: { n: number, test?: (this: { n: number }) => void } = { n: 1 constant 25 AssertType(o, "{ n: number; test?: ({ n: number;}) => void; }"); 42 o.test = f constant 43 AssertType(o.test = f, "({ n: number; }) => void"); 44 AssertType(o.test, "({ n: number; }) => void"); 47 o.test(); 48 AssertType(o.test(), "void"); 49 AssertType(o.test, "({ n: number; }) => void"); 51 o!.test(); 52 AssertType(o!.test(), "void"); [all …]
|
D | typeArgInference.ts | 25 let o = { a: 3, b: "test" }; variable 26 AssertType(o, "{ a: number; b: string; }"); 36 let t1 = x.f([o], [o]); 38 AssertType(x.f([o], [o]), "{ c: number; d: string; }"); 40 AssertType([o], "{ a: number; b: string; }[]"); 41 AssertType(o, "{ a: number; b: string; }"); 42 AssertType([o], "{ a: number; b: string; }[]"); 43 AssertType(o, "{ a: number; b: string; }"); 50 let t2 = x.f<number, string>([o], [o]); 52 AssertType(x.f<number, string>([o], [o]), "{ c: number; d: string; }"); [all …]
|
D | jsDeclarationsExportDoubleAssignmentInClosure.ts | 23 module.exports = exports = function (o) { 25 AssertType(exports = function (o) { return (o == null) ? create(base) : defineProperties(Obj… 27 AssertType(function (o) { return (o == null) ? create(base) : defineProperties(Object(o), de… 28 AssertType(o, "any"); 29 …pe(module.exports = exports = function (o) { return (o == null) ? create(base) : defineProp… 31 AssertType((o == null) ? create(base) : defineProperties(Object(o), descriptors), "any"); 32 AssertType((o == null), "boolean"); 33 AssertType(o == null, "boolean"); 34 AssertType(o, "any"); 39 AssertType(defineProperties(Object(o), descriptors), "error"); [all …]
|
D | inferenceDoesntCompareAgainstUninstantiatedTypeParameter.ts | 39 AssertType(new ClassA(new ConcreteClass(), { values: o => [ { value: o.theName… 43 AssertType({ values: o => [ { value: o.theName, func: x => 'asdfkjh… 45 values: o => [ 47 AssertType(o => [ { value: o.theName, func: x => 'asdfkjhgfdfghjkjhgfd… 48 AssertType(o, "ConcreteClass"); 49 AssertType([ { value: o.theName, func: x => 'asdfkjhgfdfghjkjhgfdfghjk… 51 AssertType({ value: o.theName, func: x => 'asdfkjhgfdfghjkjhgfdfghjklkjhgfdfg… 53 value: o.theName, 55 AssertType(o.theName, "string"); 68 …ew ClassA<ConcreteClass>(new ConcreteClass(), { values: o => [ { value: o.the… [all …]
|
D | instanceofTypeAliasToGenericClass.ts | 27 function fn<T extends Table>(o: T) { 28 AssertType(o instanceof TableClass, "boolean"); 29 AssertType(o, "T"); 31 return o instanceof TableClass; 34 function fn2<T extends TableClass>(o: T) { 35 AssertType(o instanceof TableClass, "boolean"); 36 AssertType(o, "T"); 38 return o instanceof TableClass; 41 declare const o: Table; constant 42 AssertType(o, "Table"); [all …]
|
D | genericInference2.ts | 31 let o = { variable 32 AssertType(o, "{ name: ko.Observable<string>; age: ko.Observable<number>; }"); 48 let x_v = o.name().length; // should be 'number' 50 AssertType(o.name().length, "number"); 52 let age_v = o.age(); // should be 'number' 54 AssertType(o.age(), "number"); 55 AssertType(o.age, "ko.Observable<number>"); 57 let name_v = o.name("Robert"); // should be 'any' 59 AssertType(o.name("Robert"), "any"); 60 AssertType(o.name, "ko.Observable<string>"); [all …]
|
D | overloadBindingAcrossDeclarationBoundaries.ts | 34 a(o: Opt1): Opt1; 35 a(o: Opt2): Opt2; 36 (o: Opt1): Opt1; 37 (o: Opt2): Opt2; 38 new (o: Opt1): Opt1; 39 new (o: Opt2): Opt2; 42 a(o: Opt3): Opt3; 43 a(o: Opt4): Opt4; 44 (o: Opt3): Opt3; 45 (o: Opt4): Opt4; [all …]
|
D | objectSpread.ts | 21 let o = { a: 1, b: 'no' 22 AssertType(o, "{ a: number; b: string; }"); 64 { ...o, c: false 65 AssertType({ ...o, c: false }, "{ c: false; a: number; b: string; }"); 67 AssertType(o, "{ a: number; b: string; }"); 80 { c: false, ...o 81 AssertType({ c: false, ...o }, "{ a: number; b: string; c: false; }"); 87 AssertType(o, "{ a: number; b: string; }"); 95 { ...o, b: 'override' 96 AssertType({ ...o, b: 'override' }, "{ b: string; a: number; }"); [all …]
|
D | enumIndexer.ts | 38 let x = _arr.map(o => MyEnumType[o.key] === enumValue); // these are not same type 40 AssertType(_arr.map(o => MyEnumType[o.key] === enumValue), "boolean[]"); 42 AssertType(o => MyEnumType[o.key] === enumValue, "({ key: string; }) => boolean"); 43 AssertType(o, "{ key: string; }"); 44 AssertType(MyEnumType[o.key] === enumValue, "boolean"); 45 AssertType(MyEnumType[o.key], "error"); 47 AssertType(o.key, "string");
|
D | augmentedTypeBracketNamedPropertyAccess.ts | 27 let o = {}; variable 28 AssertType(o, "{}"); 35 let r1 = o['data']; // Should be number 37 AssertType(o['data'], "number"); 38 AssertType(o, "{}"); 41 let r2 = o['functionData']; // Should be any (no property found) 43 AssertType(o['functionData'], "error"); 44 AssertType(o, "{}");
|
D | typeofUsedBeforeBlockScoped.ts | 21 type T = typeof C & typeof C.s & typeof o & typeof o.n; 25 type W = typeof o.n; 26 let o2: typeof o; 28 AssertType(o, "{ n: number; }"); 30 let o = { n: 12 }; variable 31 AssertType(o, "{ n: number; }");
|
D | indexedAccessCanBeHighOrder.ts | 22 declare function find<T, K extends keyof T>(o: T[K]): [T, K]; 38 const o = {x: 42}; constant 39 AssertType(o, "{ x: number; }"); 44 const r = impl(o, "x"); 46 AssertType(impl(o, "x"), "[{ x: number; }, "x"]"); 48 AssertType(o, "{ x: number; }"); 51 r[0][r[1]] = o[r[1]]; 52 AssertType(r[0][r[1]] = o[r[1]], "number"); 60 AssertType(o[r[1]], "number"); 61 AssertType(o, "{ x: number; }");
|
D | intersectionTypeInference1.ts | 34 …st brokenFunction = <OwnProps>(f: (p: {dispatch: number} & OwnProps) => void) => (o: OwnProps) => o 36 AssertType(<OwnProps>(f: (p: {dispatch: number} & OwnProps) => void) => (o: OwnProps) => o, "<OwnPr… 40 AssertType((o: OwnProps) => o, "(OwnProps) => OwnProps"); 41 AssertType(o, "OwnProps"); 42 AssertType(o, "OwnProps");
|
D | useObjectValuesAndEntries4.ts | 21 let o = { a: 1, b: 2 }; 22 AssertType(o, "{ a: number; b: number; }"); 29 for (let x of Object.values(o)) { 35 let entries = Object.entries(o); 37 AssertType(Object.entries(o), "[string, number][]"); 39 AssertType(o, "{ a: number; b: number; }");
|
D | controlFlowCaching.ts | 31 let o = this.opt, ta = this.chart.theme.axis, position = o.position, 32 AssertType(o, "any"); 41 AssertType(o.position, "any"); 43 leftBottom = position !== "rightOrTop", rotation = o.rotation % 360, 49 AssertType(o.rotation % 360, "number"); 50 AssertType(o.rotation, "any"); 75 taFont = o.font || (ta.majorTick && ta.majorTick.font) || (ta.tick && ta.tick.font), 77 AssertType(o.font || (ta.majorTick && ta.majorTick.font) || (ta.tick && ta.tick.font), "any"); 78 AssertType(o.font || (ta.majorTick && ta.majorTick.font), "any"); 79 AssertType(o.font, "any"); [all …]
|
D | objectSpreadNoTransform.ts | 29 const o = { x: 1, ...y }; constant 30 AssertType(o, "{ a: string; b: string; x: number; }"); 42 ({ b, ...rest } = o); 43 AssertType(({ b, ...rest } = o), "{ a: string; b: string; x: number; }"); 44 AssertType({ b, ...rest } = o, "{ a: string; b: string; x: number; }"); 48 AssertType(o, "{ a: string; b: string; x: number; }");
|
D | nonPrimitiveRhsSideOfInExpression.ts | 21 let o: object = {}; 22 AssertType(o, "object"); 30 const b1 = "foo" in o; 32 AssertType("foo" in o, "boolean"); 34 AssertType(o, "object");
|
D | spreadNonPrimitive.ts | 21 declare let o: object; 22 AssertType(o, "object"); 24 const x: { a: number, b: number } = { a: 1, ...o, b: 2 }; 28 AssertType({ a: 1, ...o, b: 2 }, "{ b: number; a: number; }"); 31 AssertType(o, "object");
|
/arkcompiler/runtime_core/libpandafile/ |
D | pandafile_isapi.rb | 61 sig = format_ops(group.first.format).each { |o| o.width = storage_width(o.width) } 63 insn.operands.each_with_index do |o, i| 64 sig[i].width = [o.width, sig[i].width].max 67 sig.each do |o| 68 if o.name.start_with?('imm') 69 o.type, o.name = is_jump ? ['const Label &', 'label'] : ["int#{o.width}_t", o.name] 71 o.type = "uint#{o.width}_t"
|
/arkcompiler/runtime_core/assembler/ |
D | asm_isapi.rb | 90 format_ops(insn.format).each do |o| 91 if o.name.start_with?('imm') 93 o.type, o.name = is_jump ? ['const std::string &', 'label'] : ['double', o.name] 95 o.type, o.name = is_jump ? ['const std::string &', 'label'] : ['int64_t', o.name] 97 elsif o.name.start_with?('id') 98 o.type, o.name = ['const std::string &', o.name] 100 o.type = 'uint16_t'
|
/arkcompiler/runtime_core/assembler/templates/ |
D | ins_create_api.h.erb | 26 % signature_str = signature.map { |o| "#{o.type} #{o.name}" }.join(', ') 32 % format.each { |o| o.width = storage_width(o.width) } 34 % format.each_with_index do |o, i| 35 % if o.name.start_with?('v') 42 % format.each_with_index do |o, i| 43 % if o.name.start_with?('imm') 47 <%=group.first.emitter_name%>_.imms.emplace_back(<%= o.name %>); 49 % elsif o.name.start_with?('id') 50 <%=group.first.emitter_name%>_.ids.push_back(<%= o.name %>); 52 <%=group.first.emitter_name%>_.regs.push_back(<%= o.name %>);
|
/arkcompiler/ets_runtime/test/aottest/vtable/base/ |
D | base.ts | 57 function testVtable(o:A) { 58 print(o.x); 59 print(o.y); 60 o.foo(); 61 o.bar(); 62 print("constructor.name:", o.t); 63 o.t = "setter";
|
/arkcompiler/runtime_core/ldscripts/ |
D | panda.ld | 67 KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) 73 KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) 78 KEEP (*crtbegin.o(.ctors)) 79 KEEP (*crtbegin?.o(.ctors)) 80 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors)) 85 KEEP (*crtbegin.o(.dtors)) 86 KEEP (*crtbegin?.o(.dtors)) 87 KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
|
/arkcompiler/ets_frontend/es2panda/test/parser/ts/type_checker/ |
D | recursiveTypeofWithProperty.ts | 17 var o: { variable 19 t: typeof o.b.c, 20 z: typeof o.b.k.t 23 c: typeof o.a.z, 25 t: typeof o.a.t,
|
/arkcompiler/runtime_core/libark_defect_scan_aux/tests/unittest/ |
D | debug_info_test.js | 48 add(o) { argument 49 this.x += o; 52 sub(o) { argument 53 this.x -= o; 57 function bar(o) { argument 70 data.sub(o); 73 if (o) {
|