raorn
Member
Looks like mafia does implicit typecats. For example, in
n in assignment will be autoconverted to_int().
Can anyone describe these rules? When mafia does implicit typecasts and when it bails with "can's assign XXX to YYY type"?
I may admit, that mafia can assign (add, multiple) variable of type XXX to type YYY if it's possible to convert XXX to YYY in one operation, e.g. YYY to_YYY(XXX) function exsist. If it's true, will it work with complex types (arrays, maps, records) and does user-defined functions supported?
Code:
int n = 5;
print("n = " + n);
n in assignment will be autoconverted to_int().
Can anyone describe these rules? When mafia does implicit typecasts and when it bails with "can's assign XXX to YYY type"?
I may admit, that mafia can assign (add, multiple) variable of type XXX to type YYY if it's possible to convert XXX to YYY in one operation, e.g. YYY to_YYY(XXX) function exsist. If it's true, will it work with complex types (arrays, maps, records) and does user-defined functions supported?