pike.git
/
src
/
pike_types.cmod
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/pike_types.cmod:9571:
case T_MULTISET: case T_MAPPING: /* Illegal range operation. */ /* FIXME: Strict type warning. */ return 0; case T_ARRAY: /* FIXME: cdr */ case T_STRING: /* Check that the index types are compatible with int. */ {
+
/* FIXME: Validate index1 and index2 type against index type. */
if (index1_type && !match_types(int_type_string, index1_type)) { ref_push_type_value(t); yytype_report(REPORT_WARNING, NULL, 0, int_type_string, NULL, 0, index1_type, 1, "Bad argument 1 to range operator on %O."); /* Bad index1 type. */ return 0; } if (index2_type && !match_types(int_type_string, index2_type)) { ref_push_type_value(t); yytype_report(REPORT_WARNING, NULL, 0, int_type_string, NULL, 0, index2_type, 1, "Bad argument 2 to range operator on %O."); /* Bad index2 type. */ return 0; }
-
+
/* FIXME: Adjust index type of result to be from
+
* min(index1) to max(index2).
+
* FIXME: Do we need to check against the index type too?
+
*/
} /* FALLTHROUGH */ default: /* Identity. */ add_ref(t); return t; case T_OR: { struct pike_type *a,*b;