Home
last modified time | relevance | path

Searched refs:param (Results 1 – 25 of 96) sorted by relevance

1234

/arkcompiler/ets_runtime/test/typeinfer/automatedcases/privacyFunctionParameterDeclFile/
DprivacyFunctionParameterDeclFile_externalModule.ts29 new (param: privateClass): publicClass; // Error
30 (param: privateClass): publicClass; // Error
31 myMethod(param: privateClass): void; // Error
35 new (param: publicClass): publicClass;
36 (param: publicClass): publicClass;
37 myMethod(param: publicClass): void;
41 new (param: privateClass): privateClass;
42 (param: privateClass): privateClass;
43 myMethod(param: privateClass): void;
47 new (param: publicClass): publicClass;
[all …]
DprivacyFunctionParameterDeclFile_GlobalFile.ts25 new (param: publicClassInGlobal): publicClassInGlobal;
26 (param: publicClassInGlobal): publicClassInGlobal;
27 myMethod(param: publicClassInGlobal): void;
30 static myPublicStaticMethod(param: publicClassInGlobal) {
32 private static myPrivateStaticMethod(param: publicClassInGlobal) {
34 myPublicMethod(param: publicClassInGlobal) {
36 private myPrivateMethod(param: publicClassInGlobal) {
38 …constructor(param: publicClassInGlobal, private param1: publicClassInGlobal, public param2: public…
41 function publicFunctionWithPublicParmeterTypesInGlobal(param: publicClassInGlobal) {
43 declare function publicAmbientFunctionWithPublicParmeterTypesInGlobal(param: publicClassInGlobal): …
[all …]
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/privacyFunctionCannotNameParameterTypeDeclFile/
DprivacyFunctionCannotNameParameterTypeDeclFile_consumer.ts24 static myPublicStaticMethod(param = exporter.createExportedWidget1()) { // Error
26 private static myPrivateStaticMethod(param = exporter.createExportedWidget1()) {
28 myPublicMethod(param = exporter.createExportedWidget1()) { // Error
30 private myPrivateMethod(param = exporter.createExportedWidget1()) {
32 …constructor(param = exporter.createExportedWidget1(), private param1 = exporter.createExportedWidg…
36 static myPublicStaticMethod(param = exporter.createExportedWidget3()) { // Error
38 private static myPrivateStaticMethod(param = exporter.createExportedWidget3()) {
40 myPublicMethod(param = exporter.createExportedWidget3()) { // Error
42 private myPrivateMethod(param = exporter.createExportedWidget3()) {
44 …constructor(param = exporter.createExportedWidget3(), private param1 = exporter.createExportedWidg…
[all …]
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/
DtypeGuardsInClassMethods.ts32 constructor(param: string | number) {
59 num = typeof param === "string" && param.length; // string
60 AssertType(num = typeof param === "string" && param.length, "number");
62 AssertType(typeof param === "string" && param.length, "number");
63 AssertType(typeof param === "string", "boolean");
64 AssertType(typeof param, "union");
65 AssertType(param, "union");
67 AssertType(param.length, "number");
70 private p1(param: string | number) {
97 num = typeof param === "string" && param.length; // string
[all …]
DcontrolFlowCommaExpressionAssertionWithinTernary.ts23 function foo2(param: number | null | undefined): number | null {
24 const val = param !== undefined;
26 AssertType(param !== undefined, "boolean");
27 AssertType(param, "union");
30 AssertType(val ? (assert(param !== undefined), param) : null, "union");
32 AssertType((assert(param !== undefined), param), "union");
33 AssertType(assert(param !== undefined), param, "union");
34 AssertType(assert(param !== undefined), "void");
36 AssertType(param !== undefined, "boolean");
37 AssertType(param, "union");
[all …]
DtypeGuardsInFunction.ts32 function f(param: string | number) {
59 num = typeof param === "string" && param.length; // string
60 AssertType(num = typeof param === "string" && param.length, "number");
62 AssertType(typeof param === "string" && param.length, "number");
63 AssertType(typeof param === "string", "boolean");
64 AssertType(typeof param, "union");
65 AssertType(param, "union");
67 AssertType(param.length, "number");
70 function f1(param: string | number) {
101 num = typeof param === "string" && param.length; // string
[all …]
DdeclFileTypeAnnotationVisibilityErrorParameterOfFunction.ts30 function foo1(param: private1) {
32 function foo2(param = new private1()) {
35 export function foo3(param : private1) {
37 export function foo4(param = new private1()) {
40 function foo11(param: public1) {
42 function foo12(param = new public1()) {
45 export function foo13(param: public1) {
47 export function foo14(param = new public1()) {
55 function foo111(param: m2.public2) {
57 function foo112(param = new m2.public2()) {
[all …]
DtypeGuardsInClassAccessors.ts66 set p1(param: string | number) {
79 num = typeof param === "string" && param.length; // string
80 AssertType(num = typeof param === "string" && param.length, "number");
82 AssertType(typeof param === "string" && param.length, "number");
83 AssertType(typeof param === "string", "boolean");
84 AssertType(typeof param, "union");
85 AssertType(param, "union");
87 AssertType(param.length, "number");
134 private set pp1(param: string | number) {
147 num = typeof param === "string" && param.length; // string
[all …]
DtypeGuardsObjectMethods.ts39 method(param: string | number) {
41 AssertType(param, "union");
69 num = typeof param === "string" && param.length; // string
70 AssertType(num = typeof param === "string" && param.length, "number");
72 AssertType(typeof param === "string" && param.length, "number");
73 AssertType(typeof param === "string", "boolean");
74 AssertType(typeof param, "union");
75 AssertType(param, "union");
77 AssertType(param.length, "number");
115 set prop(param: string | number) {
[all …]
DcontrolFlowBindingElement.ts22 const data = { param: 'value' };
24 AssertType({ param: 'value' }, "{ param: string; }");
25 AssertType(param, "string");
29 param = (() => { throw new Error('param is not defined') })(), constant
30 AssertType(param, "string");
41 console.log(param); // should not trigger 'Unreachable code detected.'
42 AssertType(console.log(param), "void");
44 AssertType(param, "string");
49 const data = { param: 'value' };
51 AssertType({ param: 'value' }, "{ param: string; }");
[all …]
DdeclFileTypeAnnotationVisibilityErrorAccessors.ts47 set foo3(param: private1) {
56 set foo4(param: private1) {
63 set foo5(param: private1) {
79 set foo13(param: public1) {
88 set foo14(param: public1) {
95 set foo15(param: public1) {
111 set foo113(param: m2.public2) {
120 set foo114(param: m2.public2) {
127 set foo115(param: m2.public2) {
DjsDeclarationsClasses.ts227 constructor(param) {
232 this.another = param;
233 AssertType(this.another = param, "T");
236 AssertType(param, "T");
248 constructor(param) {
249 super(param);
250 AssertType(super(param), "void");
252 AssertType(param, "U");
254 this.another2 = param;
255 AssertType(this.another2 = param, "U");
[all …]
DstaticPrototypePropertyOnClass.ts30 constructor(param: string);
31 constructor(param: number);
32 constructor(param: any) {
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/privacyAccessorDeclFile/
DprivacyAccessorDeclFile_externalModule.ts184 static set myPublicStaticMethod(param: privateClass) { // Error
186 private static set myPrivateStaticMethod(param: privateClass) {
188 set myPublicMethod(param: privateClass) { // Error
190 private set myPrivateMethod(param: privateClass) {
195 static set myPublicStaticMethod(param: publicClass) {
197 private static set myPrivateStaticMethod(param: publicClass) {
199 set myPublicMethod(param: publicClass) {
201 private set myPrivateMethod(param: publicClass) {
206 static set myPublicStaticMethod(param: privateClass) {
208 private static set myPrivateStaticMethod(param: privateClass) {
[all …]
DprivacyAccessorDeclFile_GlobalFile.ts64 static set myPublicStaticMethod(param: publicClassInGlobal) {
66 private static set myPrivateStaticMethod(param: publicClassInGlobal) {
68 set myPublicMethod(param: publicClassInGlobal) {
70 private set myPrivateMethod(param: publicClassInGlobal) {
244 static set myPublicStaticMethod(param: privateClass) {
246 private static set myPrivateStaticMethod(param: privateClass) {
248 set myPublicMethod(param: privateClass) {
250 private set myPrivateMethod(param: privateClass) {
255 static set myPublicStaticMethod(param: publicClass) {
257 private static set myPrivateStaticMethod(param: publicClass) {
[all …]
/arkcompiler/runtime_core/compiler/tests/
Dasm_caller.cpp29 DEF(mov, [](auto param) { return param; }) \
30 DEF(neg, [](auto param) { return -param; }) \
31 DEF(abs, [](auto param) { return (param > 0) ? param : -param; }) \
32 DEF(not, [](auto param) { return -param - 1L; })
44 #define C_EXTERN_ONE_PARAM(opc, param) \ argument
52 #define C_EXTERN_TWO_PARAM(opc, param) \ argument
72 #define CALL_ONE_PARAM_OUTPUT(opc, param) \ in EMITED_TWO_PARAM_INST_LIST() argument
83 #define CALL_ONE_PARAM_OUTPUT(opc, param) \ in EMITED_TWO_PARAM_INST_LIST() argument
84 EXPECT_EQ(test_##opc##_8(ui8), static_cast<uint8_t>(param(ui8))); \ in EMITED_TWO_PARAM_INST_LIST()
85 EXPECT_EQ(test_##opc##_16(ui16), static_cast<uint16_t>(param(ui16))); \ in EMITED_TWO_PARAM_INST_LIST()
[all …]
/arkcompiler/ets_frontend/es2panda/typescript/core/
Dfunction.cpp122 const ir::Identifier *param) in CheckFunctionIdentifierParameter() argument
124 ASSERT(param->Variable()); in CheckFunctionIdentifierParameter()
125 binder::Variable *paramVar = param->Variable(); in CheckFunctionIdentifierParameter()
126 bool isOptional = param->IsOptional(); in CheckFunctionIdentifierParameter()
128 if (!param->TypeAnnotation()) { in CheckFunctionIdentifierParameter()
129 ThrowTypeError({"Parameter ", param->Name(), " implicitly has any type."}, param->Start()); in CheckFunctionIdentifierParameter()
136 param->TypeAnnotation()->Check(this); in CheckFunctionIdentifierParameter()
137 paramVar->SetTsType(param->TypeAnnotation()->AsTypeNode()->GetType(this)); in CheckFunctionIdentifierParameter()
207 const ir::AssignmentExpression *param) in CheckFunctionAssignmentPatternParameter() argument
209 if (param->Left()->IsIdentifier()) { in CheckFunctionAssignmentPatternParameter()
[all …]
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/anonClassDeclarationEmitIsAnon/
DwrapClass.ts21 export function wrapClass(param: any) {
22 AssertType(class Wrapped { foo() { return param; } }, "typeof Wrapped");
29 AssertType(param, "any");
30 return param;
/arkcompiler/ets_runtime/test/typeinfer/automatedcases/declarationEmitAliasExportStar/
Dindex.ts22 export const thing2 = (param: things.ThingB) => null;
24 AssertType((param: things.ThingB) => null, "(things.ThingB) => any");
25 AssertType(param, "things.ThingB");
/arkcompiler/ets_frontend/es2panda/compiler/core/
Dfunction.cpp63 auto *param = it; in CompileFunctionParameterDeclaration() local
64 if (param->IsTSParameterProperty()) { in CompileFunctionParameterDeclaration()
65 param = param->AsTSParameterProperty()->Parameter(); in CompileFunctionParameterDeclaration()
67 LReference ref = LReference::CreateLRef(pg, param, true); in CompileFunctionParameterDeclaration()
82 if (param->IsAssignmentPattern()) { in CompileFunctionParameterDeclaration()
94 param->AsAssignmentPattern()->Right()->Compile(pg); in CompileFunctionParameterDeclaration()
105 param->AsAssignmentPattern()->Right()->Compile(pg); in CompileFunctionParameterDeclaration()
113 if (param->IsRestElement()) { in CompileFunctionParameterDeclaration()
114 pg->CopyRestArgs(param, func->Params().size() - 1); in CompileFunctionParameterDeclaration()
/arkcompiler/ets_frontend/merge_abc/src/
DassemblyFunctionProto.cpp40 void Parameter::Serialize(const panda::pandasm::Function::Parameter &param, protoPanda::Parameter &… in Serialize() argument
43 Type::Serialize(param.type, *type); in Serialize()
45 ParamMetadata::Serialize(*(param.metadata), *metadata); in Serialize()
48 …r::Deserialize(const protoPanda::Parameter &protoParam, panda::pandasm::Function::Parameter &param, in Deserialize() argument
51 ParamMetadata::Deserialize(protoParam.metadata(), param.metadata, allocator); in Deserialize()
90 for (const auto &param : function.params) { in Serialize() local
92 Parameter::Serialize(param, *protoParam); in Serialize()
155 … panda::pandasm::Function::Parameter param(paramType, panda::panda_file::SourceLang::ECMASCRIPT); in Deserialize() local
156 Parameter::Deserialize(protoParam, param, allocator); in Deserialize()
157 function.params.emplace_back(std::move(param)); in Deserialize()
/arkcompiler/ets_frontend/es2panda/ir/base/
DmethodDefinition.cpp51 for (auto param : paramDecorators_) { in Iterate() local
52 for (auto *it : param.decorators) { in Iterate()
117 for (auto param : paramDecorators_) { in UpdateSelf() local
118 for (auto iter = param.decorators.begin(); iter != param.decorators.end(); iter++) { in UpdateSelf()
/arkcompiler/ets_frontend/es2panda/test/compiler/ts/cases/conformance/classes/
Dtest-ts-classes-19.ts19 func:function (param) {
20 print(param);
/arkcompiler/ets_frontend/es2panda/test/compiler/js/parameter/
Dparameter-with-default-value-1.js2 constructor(param) { argument
3 this.c = param;
/arkcompiler/ets_frontend/ts2panda/src/
DsyntaxCheckerForStrcitMode.ts145 let param = parameters[i];
146 checkEvalOrArgumentsOrOriginalKeyword(param, param.name);
147 let name = jshelpers.getTextOfIdentifierOrLiteral(<ts.Identifier>param.name);
149 let args: (string | number)[] = [jshelpers.declarationNameToString(param.name)];
150 … throw new DiagnosticError(param.name, DiagnosticCode.Duplicate_identifier_0, undefined, args);
157 if (param.initializer || param.dotDotDotToken) {
159 …throw new DiagnosticError(param, DiagnosticCode.use_strict_directive_cannot_be_used_with_non_simpl…

1234