| /arkcompiler/ets_frontend/ets2panda/ir/ts/ |
| D | tsTypeParameter.h | 26 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/ |
| D | typeParameter.h | 25 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/ |
| D | typeParameter.h | 24 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/ |
| D | validation.rb | 80 data.each { |constraint, value| method.send(constraint.to_sym, value) }
|
| /arkcompiler/ets_frontend/es2panda/ir/ts/ |
| D | tsTypeParameter.h | 36 explicit TSTypeParameter(Identifier *name, Expression *constraint, Expression *defaultType, 40 constraint_(constraint), in Expression()
|
| /arkcompiler/ets_frontend/ets2panda/checker/ets/ |
| D | typeRelationContext.cpp | 110 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/ |
| D | test-ts-mapped-type-expected.txt | 38 "constraint": { 207 "constraint": { 376 "constraint": { 545 "constraint": { 712 "constraint": { 879 "constraint": { 1033 "constraint": {
|
| /arkcompiler/runtime_core/static_core/plugins/ets/doc/spec/ |
| D | 5_generics.rst | 66 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/ |
| D | test-ts-mapped-type-expected.txt | 40 "constraint": { 222 "constraint": { 404 "constraint": { 586 "constraint": { 766 "constraint": { 946 "constraint": { 1113 "constraint": {
|
| /arkcompiler/ets_frontend/ets2panda/test/ast/parser/ets/ |
| D | typeparameter_constraint_circular-neg_0.sts | 17 /* @@? 16:25 Error TypeError: Type parameter 'T' has circular constraint dependency. */
|
| D | recordKeyTypeCheck03.sts | 21 /* @@? 19:18 Error TypeError: Type BigInt is not assignable to constraint type Numeric|String */
|
| D | recordKeyTypeCheck02.sts | 24 /* @@? 19:18 Error TypeError: Type A|Double is not assignable to constraint type Numeric|String */
|
| D | recordKeyTypeCheck01.sts | 22 /* @@? 17:18 Error TypeError: Type Char|String is not assignable to constraint type Numeric|String …
|
| D | typeparameter_constraint_circular-neg_1.sts | 17 /* @@? 16:51 Error TypeError: Type parameter 'R' has circular constraint dependency. */
|
| D | generics_type_param_constraint_8.sts | 22 /* @@? 19:30 Error TypeError: Type Char is not assignable to constraint type Comparable<String> */
|
| D | generic_error.sts | 26 /* @@? 23:22 Error TypeError: Type C is not assignable to constraint type Comparable<Object> */
|
| /arkcompiler/ets_frontend/ets2panda/test/compiler/ets/ |
| D | generics_interface_bounds_2-expected.txt | 127 "constraint": { 196 "constraint": {
|
| /arkcompiler/ets_frontend/ets2panda/test/ast/compiler/ets/ |
| D | TypeError_recursive_parameter_2.sts | 20 /* @@? 18:19 Error TypeError: Type P2 is not assignable to constraint type A<P1,P2> */
|
| D | recursive_interface_neg_1.sts | 19 /* @@? 17:22 Error TypeError: Type D is not assignable to constraint type A<D> */
|
| D | TypeError_recursive_parameter_1.sts | 19 /* @@? 17:18 Error TypeError: Type B is not assignable to constraint type A<B> */
|
| D | recursive_class_neg.sts | 18 /* @@? 15:20 Error TypeError: Type A<T> is not assignable to constraint type A<A<A<T>>> */
|
| D | generic_typealias_5_neg.sts | 25 /* @@? 22:13 Error TypeError: Type B is not assignable to constraint type Comparable<B> */
|
| D | recursive_interface_neg_2.sts | 19 /* @@? 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/ |
| D | generic_class_wrong_constraint.sts | 19 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/ |
| D | cte.sts | 20 if it has no type constraint
|