| /arkcompiler/ets_frontend/ets2panda/test/compiler/ets/ |
| D | implicit-conversion-expected.txt | 15 "program": "implicit-conversion.ets" 20 "program": "implicit-conversion.ets" 124 "program": "implicit-conversion.ets" 129 "program": "implicit-conversion.ets" 143 "program": "implicit-conversion.ets" 148 "program": "implicit-conversion.ets" 169 "program": "implicit-conversion.ets" 174 "program": "implicit-conversion.ets" 188 "program": "implicit-conversion.ets" 193 "program": "implicit-conversion.ets" [all …]
|
| D | conversion-w-ASExpr-expected.txt | 15 "program": "conversion-w-ASExpr.ets" 20 "program": "conversion-w-ASExpr.ets" 124 "program": "conversion-w-ASExpr.ets" 129 "program": "conversion-w-ASExpr.ets" 143 "program": "conversion-w-ASExpr.ets" 148 "program": "conversion-w-ASExpr.ets" 169 "program": "conversion-w-ASExpr.ets" 174 "program": "conversion-w-ASExpr.ets" 188 "program": "conversion-w-ASExpr.ets" 193 "program": "conversion-w-ASExpr.ets" [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/doc/spec/ |
| D | 6_conversions.rst | 86 performing an implicit *conversion* can ensure :ref:`Assignability`. 87 The conversion from type ``S`` to type ``T`` causes a type ``S`` expression 99 conversion 108 *conversion* vary for different kinds of contexts and types of expressions. 112 Some cases of conversion require action at runtime to check the 113 validity of conversion, or to translate the runtime expression value 125 conversion 164 conversion 208 conversion 256 If there is no applicable conversion, then a :index:`compile-time error` [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/33.constant_expression/check_array/ |
| D | constant_calculation.params.yaml | 39 - { type: long, value: 56, sign: '*', expected: 560, conversion: as int } 40 - { type: long, value: 506, sign: '/', expected: 50, conversion: as int } 41 - { type: long, value: 506, sign: '%', expected: 6, conversion: as int } 42 - { type: long, value: 506, sign: '+', expected: 516, conversion: as int } 43 - { type: long, value: 506, sign: '-', expected: 496, conversion: as int } 45 - { type: float, value: 123.2f, sign: '*', expected: 1232, conversion: as int } 46 - { type: float, value: 123.2f, sign: '/', expected: 12, conversion: as int } 47 - { type: float, value: 123.2f, sign: '%', expected: 3, conversion: as int } 48 - { type: float, value: 123.2f, sign: '+', expected: 133, conversion: as int } 49 - { type: float, value: 123.2f, sign: '-', expected: 113, conversion: as int } [all …]
|
| /arkcompiler/ets_frontend/ets2panda/checker/types/ets/ |
| D | floatType.cpp | 18 #include "checker/ets/conversion.h" 56 conversion::Identity(relation, this, target); in Cast() 61 conversion::NarrowingPrimitive(relation, this, target); in Cast() 66 conversion::WideningPrimitive(relation, this, target); in Cast() 72 conversion::Boxing(relation, this); in Cast() 79 conversion::Forbidden(relation); in Cast() 84 conversion::Boxing(relation, unboxedTarget); in Cast() 87 conversion::Forbidden(relation); in Cast() 91 conversion::BoxingWideningReference(relation, this, target->AsETSObjectType()); in Cast() 95 conversion::Forbidden(relation); in Cast()
|
| D | charType.cpp | 18 #include "checker/ets/conversion.h" 56 conversion::Identity(relation, this, target); in Cast() 61 conversion::NarrowingPrimitive(relation, this, target); in Cast() 66 conversion::WideningPrimitive(relation, this, target); in Cast() 72 conversion::Boxing(relation, this); in Cast() 79 conversion::Forbidden(relation); in Cast() 84 conversion::Boxing(relation, unboxedTarget); in Cast() 87 conversion::Forbidden(relation); in Cast() 91 conversion::BoxingWideningReference(relation, this, target->AsETSObjectType()); in Cast() 95 conversion::Forbidden(relation); in Cast()
|
| D | shortType.cpp | 18 #include "checker/ets/conversion.h" 56 conversion::Identity(relation, this, target); in Cast() 61 conversion::NarrowingPrimitive(relation, this, target); in Cast() 66 conversion::WideningPrimitive(relation, this, target); in Cast() 72 conversion::Boxing(relation, this); in Cast() 79 conversion::Forbidden(relation); in Cast() 84 conversion::Boxing(relation, unboxedTarget); in Cast() 87 conversion::Forbidden(relation); in Cast() 91 conversion::BoxingWideningReference(relation, this, target->AsETSObjectType()); in Cast() 95 conversion::Forbidden(relation); in Cast()
|
| D | longType.cpp | 18 #include "checker/ets/conversion.h" 56 conversion::Identity(relation, this, target); in Cast() 61 conversion::NarrowingPrimitive(relation, this, target); in Cast() 66 conversion::WideningPrimitive(relation, this, target); in Cast() 72 conversion::Boxing(relation, this); in Cast() 79 conversion::Forbidden(relation); in Cast() 84 conversion::Boxing(relation, unboxedTarget); in Cast() 87 conversion::Forbidden(relation); in Cast() 91 conversion::BoxingWideningReference(relation, this, target->AsETSObjectType()); in Cast() 95 conversion::Forbidden(relation); in Cast()
|
| D | intType.cpp | 18 #include "checker/ets/conversion.h" 56 conversion::Identity(relation, this, target); in Cast() 61 conversion::NarrowingPrimitive(relation, this, target); in Cast() 66 conversion::WideningPrimitive(relation, this, target); in Cast() 72 conversion::Boxing(relation, this); in Cast() 79 conversion::Forbidden(relation); in Cast() 84 conversion::Boxing(relation, unboxedTarget); in Cast() 87 conversion::Forbidden(relation); in Cast() 91 conversion::BoxingWideningReference(relation, this, target->AsETSObjectType()); in Cast() 95 conversion::Forbidden(relation); in Cast()
|
| D | byteType.cpp | 18 #include "checker/ets/conversion.h" 56 conversion::Identity(relation, this, target); in Cast() 61 conversion::WideningPrimitive(relation, this, target); in Cast() 66 conversion::WideningNarrowingPrimitive(relation, this, target->AsCharType()); in Cast() 72 conversion::Boxing(relation, this); in Cast() 79 conversion::Forbidden(relation); in Cast() 84 conversion::Boxing(relation, unboxedTarget); in Cast() 87 conversion::Forbidden(relation); in Cast() 91 conversion::BoxingWideningReference(relation, this, target->AsETSObjectType()); in Cast() 95 conversion::Forbidden(relation); in Cast()
|
| D | doubleType.cpp | 18 #include "checker/ets/conversion.h" 55 conversion::Identity(relation, this, target); in Cast() 61 conversion::NarrowingPrimitive(relation, this, target); in Cast() 67 conversion::Boxing(relation, this); in Cast() 74 conversion::Forbidden(relation); in Cast() 79 conversion::Boxing(relation, unboxedTarget); in Cast() 82 conversion::Forbidden(relation); in Cast() 86 conversion::BoxingWideningReference(relation, this, target->AsETSObjectType()); in Cast() 90 conversion::Forbidden(relation); in Cast()
|
| D | etsBooleanType.cpp | 19 #include "checker/ets/conversion.h" 48 conversion::Identity(relation, this, target); in Cast() 54 conversion::Boxing(relation, this); in Cast() 59 conversion::Forbidden(relation); in Cast() 63 conversion::BoxingWideningReference(relation, this, target->AsETSObjectType()); in Cast() 67 conversion::Forbidden(relation); in Cast()
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/17.experimental_features/03.array_creation_expressions/ |
| D | expr.params.yaml | 24 let size = 1 // identity dimension conversion 31 let size: Int = new Int(1) // unboxing dimension conversion 38 let size: number = 1 // narrowing dimension conversion 45 let size: Number = new Number(1) // unboxing and narrowing dimension conversion 52 let size: float = 1.0 // narrowing dimension conversion 59 let size: Float = new Float(1.0) // unboxing and narrowing dimension conversion 66 let size: byte = 10 as byte // widening dimension conversion 73 let size: Byte = new Byte(10 as byte) // unboxing and widening dimension conversion 80 let size: short = 1000 as short // widening dimension conversion 87 let size: Short = new Short(1000 as short) // unboxing and widening dimension conversion [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/07.expressions/33.constant_expression/check_enum/ |
| D | constant_calculation.params.yaml | 45 - { type: float, value: 123.2f, sign: '*', expected: 1232, conversion: as int } 46 - { type: float, value: 123.2f, sign: '/', expected: 12, conversion: as int } 47 - { type: float, value: 123.2f, sign: '%', expected: 3, conversion: as int } 48 - { type: float, value: 123.2f, sign: '+', expected: 133, conversion: as int } 49 - { type: float, value: 123.2f, sign: '-', expected: 113, conversion: as int } 51 - { type: number, value: 5051.9, sign: '*', expected: 50519, conversion: as int } 52 - { type: number, value: 5051.9, sign: '/', expected: 505, conversion: as int } 53 - { type: number, value: 5051.9, sign: '%', expected: 1, conversion: as int } 54 - { type: number, value: 5051.9, sign: '+', expected: 5061, conversion: as int } 55 - { type: number, value: 5051.9, sign: '-', expected: 5041, conversion: as int }
|
| D | constant_unary_minus.params.yaml | 20 - { type: float, value: 120.2f, expected: -120, conversion: as int } 21 - { type: number, value: 5050.9, expected: -5050, conversion: as int } 26 - { type: float, value: -120.2f, expected: 120, conversion: as int } 27 - { type: number, value: -5050.9, expected: 5050, conversion: as int }
|
| D | constant_unary_plus.params.yaml | 20 - { type: float, value: 120.2f, expected: 120, conversion: as int } 21 - { type: number, value: 5050.9, expected: 5050, conversion: as int } 26 - { type: float, value: -120.2f, expected: -120, conversion: as int } 27 - { type: number, value: -5050.9, expected: -5050, conversion: as int }
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/03.numeric_operator_contexts/ |
| D | conv.params.yaml | 24 # widening reference conversion followed by an unboxing conversion 49 # widening reference conversion followed by an unboxing conversion, then followed by a widening pri… 74 # unboxing conversion 78 # unboxing conversion followed by a widening primitive conversion
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/08.function_types_conversions/decl_var/ |
| D | decl-var-n2.ets | 19 Function types conversion is the conversion of one function type to another. 20 Declaration context, variable, function type conversion, implicit
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/08.function_types_conversions/comp_obj/ |
| D | comp-clss-n2.ets | 19 Function types conversion is the conversion of one function type to another. 20 Composite context, object, function type conversion, implicit
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/08.function_types_conversions/assn_var/ |
| D | assn-var-n2.ets | 19 Function types conversion is the conversion of one function type to another. 20 Assignment context, variable, function type conversion, implicit
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/08.function_types_conversions/decl_field/ |
| D | decl-field-n2.ets | 19 Function types conversion is the conversion of one function type to another. 20 Declaration context, instance field, function type conversion, implicit
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/08.function_types_conversions/comp_arr/ |
| D | comp-arr-n2.ets | 19 Function types conversion is the conversion of one function type to another. 20 Composite context, array, function type conversion, implicit
|
| /arkcompiler/ets_frontend/ets2panda/checker/ets/ |
| D | conversion.cpp | 16 #include "conversion.h" 25 namespace ark::es2panda::checker::conversion { namespace 116 // 11.1.6. Narrowing Reference Conversion in IsAllowedNarrowingReferenceConversion() 117 …// A narrowing reference conversion exists from reference type S to a reference type T if all of t… in IsAllowedNarrowingReferenceConversion() 155 … // array of components of type TC; and a narrowing reference conversion exists from SC to TC. in IsAllowedNarrowingReferenceConversion() 168 …// 9. S is a type variable, and a narrowing reference conversion exists from the upper bound of S … in IsAllowedNarrowingReferenceConversion() 171 … is a type variable, and either a widening reference conversion or a narrowing reference conversio… in IsAllowedNarrowingReferenceConversion() 176 // conversion or a in IsAllowedNarrowingReferenceConversion() 177 // narrowing reference conversion exists from Si to T. in IsAllowedNarrowingReferenceConversion() 181 // conversion or a in IsAllowedNarrowingReferenceConversion() [all …]
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/08.function_types_conversions/call_lmbd/ |
| D | call-lmbd-n2.ets | 19 Function types conversion is the conversion of one function type to another. 20 Call context, lambda, function type conversion, implicit
|
| /arkcompiler/runtime_core/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/05.implicit_conversions/08.function_types_conversions/call_func/ |
| D | call-func-n2.ets | 19 Function types conversion is the conversion of one function type to another. 20 Call context, function, function type conversion, implicit
|