Branch: Tag:

2016-12-29

2016-12-29 10:23:54 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Compiler: Improved backward compat for ::_indices() et al.

Removes the deprecation warning when using the old-style syntax.

The return value for ::`->=() is no longer void.

3912:    case F_MAGIC_INDEX:    /* FIXME: Could have a stricter type for ::`->(). */    /* FIXME: */ -  MAKE_CONSTANT_TYPE(n->type, tFunc(tStr tOr3(tVoid,tObj,tDeprecated(tInt)) +  MAKE_CONSTANT_TYPE(n->type, tFunc(tStr tOr3(tVoid,tObj,tInt)    tOr(tVoid,tInt), tMix));    break;    case F_MAGIC_SET_INDEX:    /* FIXME: Could have a stricter type for ::`->=(). */    /* FIXME: */ -  MAKE_CONSTANT_TYPE(n->type, tFunc(tStr tMix tOr3(tVoid,tObj,tDeprecated(tInt)) -  tOr(tVoid,tInt), tVoid)); +  MAKE_CONSTANT_TYPE(n->type, tFunc(tStr tMix tOr3(tVoid,tObj,tInt) +  tOr(tVoid,tInt), tZero));    break;    case F_MAGIC_INDICES: -  MAKE_CONSTANT_TYPE(n->type, tFunc(tOr3(tVoid,tObj,tDeprecated(tInt)) +  MAKE_CONSTANT_TYPE(n->type, tFunc(tOr3(tVoid,tObj,tInt)    tOr(tVoid,tInt), tArr(tStr)));    break;    case F_MAGIC_VALUES:    /* FIXME: Could have a stricter type for ::_values. */ -  MAKE_CONSTANT_TYPE(n->type, tFunc(tOr3(tVoid,tObj,tDeprecated(tInt)) +  MAKE_CONSTANT_TYPE(n->type, tFunc(tOr3(tVoid,tObj,tInt)    tOr(tVoid,tInt), tArray));    break;    case F_MAGIC_TYPES:    /* FIXME: Could have a stricter type for ::_types. */ -  MAKE_CONSTANT_TYPE(n->type, tFunc(tOr3(tVoid,tObj,tDeprecated(tInt)) +  MAKE_CONSTANT_TYPE(n->type, tFunc(tOr3(tVoid,tObj,tInt)    tOr(tVoid,tInt), tArr(tType(tMix))));    break;