Home
last modified time | relevance | path

Searched refs:constraint (Results 1 – 25 of 81) sorted by relevance

1234

/arkcompiler/ets_frontend/ets2panda/ir/ts/
DtsTypeParameter.h26 explicit TSTypeParameter(Identifier *name, TypeNode *constraint, TypeNode *defaultType) in TSTypeParameter() argument
27 …: Expression(AstNodeType::TS_TYPE_PARAMETER), name_(name), constraint_(constraint), defaultType_(d… in TSTypeParameter()
31 …explicit TSTypeParameter(Identifier *name, TypeNode *constraint, TypeNode *defaultType, ModifierFl… in TSTypeParameter() argument
34 constraint_(constraint), in TSTypeParameter()
60 void SetConstraint(TypeNode *constraint) in SetConstraint() argument
62 constraint_ = constraint; in SetConstraint()
/arkcompiler/ets_frontend/es2panda/typescript/types/
DtypeParameter.h25 TypeParameter(Type *constraint, Type *defaultType) in TypeParameter() argument
26 : Type(TypeFlag::TYPE_PARAMETER), constraint_(constraint), default_(defaultType) in TypeParameter()
/arkcompiler/ets_frontend/ets2panda/checker/types/ts/
DtypeParameter.h24 TypeParameter(Type *constraint, Type *defaultType) in TypeParameter() argument
25 : Type(TypeFlag::TYPE_PARAMETER), constraint_(constraint), default_(defaultType) in TypeParameter()
/arkcompiler/runtime_core/static_core/irtoc/lang/
Dvalidation.rb80 data.each { |constraint, value| method.send(constraint.to_sym, value) }
/arkcompiler/ets_frontend/es2panda/ir/ts/
DtsTypeParameter.h36 explicit TSTypeParameter(Identifier *name, Expression *constraint, Expression *defaultType,
40 constraint_(constraint), in Expression()
/arkcompiler/ets_frontend/ets2panda/checker/ets/
DtypeRelationContext.cpp110 auto constraint = typeParam->GetConstraintType()->Substitute(relation, substitution); in CheckInstantiationConstraints() local
111 if (!relation->IsAssignableTo(typeArg, constraint)) { in CheckInstantiationConstraints()
113 {"Type ", typeArg, " is not assignable to", " constraint type ", constraint}, pos); in CheckInstantiationConstraints()
/arkcompiler/ets_frontend/es2panda/test/parser/ts/
Dtest-ts-mapped-type-expected.txt38 "constraint": {
207 "constraint": {
376 "constraint": {
545 "constraint": {
712 "constraint": {
879 "constraint": {
1033 "constraint": {
/arkcompiler/runtime_core/static_core/plugins/ets/doc/spec/
D5_generics.rst66 can have a *constraint* (see :ref:`Type Parameter Constraint`). A type
80 constraint
96 ('in' | 'out')? identifier constraint? typeParameterDefault?
99 constraint:
158 todo: support keyof constraint #17436
161 *constraint* can be set for every type parameter.
163 A constraint of any type parameter can follow the keyword ``extends``.
164 The constraint is denoted as a type reference, type ``keyof``, or a union type.
165 If no constraint is declared, then the type parameter is not compatible with
166 ``Object``, and has no methods or fields available for use. Lack of constraint
[all …]
/arkcompiler/ets_frontend/ets2panda/test/parser/ts/
Dtest-ts-mapped-type-expected.txt40 "constraint": {
222 "constraint": {
404 "constraint": {
586 "constraint": {
766 "constraint": {
946 "constraint": {
1113 "constraint": {
/arkcompiler/ets_frontend/ets2panda/test/ast/parser/ets/
Dtypeparameter_constraint_circular-neg_0.sts17 /* @@? 16:25 Error TypeError: Type parameter 'T' has circular constraint dependency. */
DrecordKeyTypeCheck03.sts21 /* @@? 19:18 Error TypeError: Type BigInt is not assignable to constraint type Numeric|String */
DrecordKeyTypeCheck02.sts24 /* @@? 19:18 Error TypeError: Type A|Double is not assignable to constraint type Numeric|String */
DrecordKeyTypeCheck01.sts22 /* @@? 17:18 Error TypeError: Type Char|String is not assignable to constraint type Numeric|String …
Dtypeparameter_constraint_circular-neg_1.sts17 /* @@? 16:51 Error TypeError: Type parameter 'R' has circular constraint dependency. */
Dgenerics_type_param_constraint_8.sts22 /* @@? 19:30 Error TypeError: Type Char is not assignable to constraint type Comparable<String> */
Dgeneric_error.sts26 /* @@? 23:22 Error TypeError: Type C is not assignable to constraint type Comparable<Object> */
/arkcompiler/ets_frontend/ets2panda/test/compiler/ets/
Dgenerics_interface_bounds_2-expected.txt127 "constraint": {
196 "constraint": {
/arkcompiler/ets_frontend/ets2panda/test/ast/compiler/ets/
DTypeError_recursive_parameter_2.sts20 /* @@? 18:19 Error TypeError: Type P2 is not assignable to constraint type A<P1,P2> */
Drecursive_interface_neg_1.sts19 /* @@? 17:22 Error TypeError: Type D is not assignable to constraint type A<D> */
DTypeError_recursive_parameter_1.sts19 /* @@? 17:18 Error TypeError: Type B is not assignable to constraint type A<B> */
Drecursive_class_neg.sts18 /* @@? 15:20 Error TypeError: Type A<T> is not assignable to constraint type A<A<A<T>>> */
Dgeneric_typealias_5_neg.sts25 /* @@? 22:13 Error TypeError: Type B is not assignable to constraint type Comparable<B> */
Drecursive_interface_neg_2.sts19 /* @@? 17:22 Error TypeError: Type D is not assignable to constraint type A<B,D> */
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/05.generics/01.type_parameters/01.type_parameter_constraint/generic_classes/
Dgeneric_class_wrong_constraint.sts19 desc: generic parameters with wrong constraint in extends
/arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/25.equality_expressions/06.reference_equality_based_on_actual_type/object_type_equality_operators/
Dcte.sts20 if it has no type constraint

1234