[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / docs / ecma334 / 14.2.6.xml
1 <?xml version="1.0"?>
2 <clause number="14.2.6" title="Numeric promotions" informative="true">
3   <paragraph>This clause is informative. </paragraph>
4   <paragraph>Numeric promotion consists of automatically performing certain implicit conversions of the operands of the predefined unary and binary numeric operators. Numeric promotion is not a distinct mechanism, but rather an effect of applying overload resolution to the predefined operators. Numeric promotion specifically does not affect evaluation of user-defined operators, although user-defined operators can be implemented to exhibit similar effects. </paragraph>
5   <paragraph>As an example of numeric promotion, consider the predefined implementations of the binary * operator: <code_example><![CDATA[
6 int operator *(int x, int y);  
7 uint operator *(uint x, uint y);  
8 long operator *(long x, long y);  
9 ulong operator *(ulong x, ulong y);  
10 float operator *(float x, float y);  
11 double operator *(double x, double y);  
12 decimal operator *(decimal x, decimal y);  
13 ]]></code_example></paragraph>
14   <paragraph>When overload resolution rules (<hyperlink>14.4.2</hyperlink>) are applied to this set of operators, the effect is to select the first of the operators for which implicit conversions exist from the operand types. <example>[Example: For example, for the operation b * s, where b is a <keyword>byte</keyword> and s is a <keyword>short</keyword>, overload resolution selects operator *(<keyword>int</keyword>, <keyword>int</keyword>) as the best operator. Thus, the effect is that b and s are converted to <keyword>int</keyword>, and the type of the result is <keyword>int</keyword>. Likewise, for the operation i * d, where i is an <keyword>int</keyword> and d is a <keyword>double</keyword>, overload resolution selects operator *(<keyword>double</keyword>, <keyword>double</keyword>) as the best operator. end example]</example> </paragraph>
15   <paragraph>End of informative text. </paragraph>
16 </clause>