Details
Description
It would be nice to be able to overload the assignment operator, and convert implicitly:
class myNum:
public i as int
def constructor(j as int):
i = j
static def op_Assignment(j as int):
i = j
static def op_Addition(x as myNum, y as myNum) as myNum:
return x.i + y.i // becomes return myNum(x.i + y.i)
x as myNum = 0 // becomes x as myNum = myNum(0)
x = 4 // becomes x.op_Assignment(4)
Issue Links
- is related to
-
BOO-79
use implicit conversion operators
-