Branch: Tag:

2015-09-27

2015-09-27 11:23:29 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Operators: Stricter types for `%() and `~().

The type system now knows how the sign bit is handled for integers
by the above operators.

5921:    "function(array(0=mixed),int:array(0))|"    "!function(int,int:mixed)&function(int|float,int|float:float) */    ADD_EFUN2("`%", f_mod, -  tOr6(tFunc(tMix tObj,tMix), +  tOr7(tFunc(tMix tObj,tMix),    tFunc(tObj tMix,tMix), -  tFunc(tInt tInt,tInt), +  tFunc(tInt tIntPos, tIntPos), +  tFunc(tInt tIntNeg, tIntNeg),    tFunc(tStr tInt,tStr),    tFunc(tArr(tSetvar(0,tMix)) tInt,tArr(tVar(0))),    tIfnot(tFuncV(tNone, tNot(tFlt), tMix),
5932:       /* function(object:mixed)|function(int:int)|function(float:float)|function(string:string) */    ADD_EFUN2("`~",f_compl, -  tOr6(tFunc(tObj,tMix), -  tFunc(tInt,tInt), +  tOr7(tFunc(tObj,tMix), +  tFunc(tIntPos,tIntMinus), +  tFunc(tIntMinus,tIntPos),    tFunc(tFlt,tFlt),    tFunc(tStr,tStr),    tFunc(tType(tSetvar(0, tMix)), tType(tNot(tVar(0)))),