Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Compiler
-
Labels:None
-
Number of attachments :
Description
A lot of types in the BCL (System.Decimal for instance) define implicit and explict conversion operators [1].
Those operators should be used by boo as apropriate for assignments, function argument evaluation (including overloaded operators) and cast expressions.
More explicitly, the following boo program:
def x2(value as Decimal):
return value*2
print(x2(4))
d as Decimal = 0
should be interpreted as:
def x2(value as Decimal):
return Decimal.op_Multiply(value, Decimal.op_Implicit(2))
print(x2(Decimal.op_Implicit(4)))
d as Decimal = Decimal.op_Implicit(0)
leave for later to have a early 0.4 release.