pike.git/
src/
las.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2022-01-16
2022-01-16 13:29:16 by Henrik Grubbström (Grubba) <grubba@grubba.org>
0e28552d4b20273950f8592ecb61c23bfb569a84 (
16
lines) (+
11
/-
5
)
[
Show
|
Annotate
]
Branch:
master
Compiler
[Typechecker]
: Improved checking of splice operator some more.
4025:
yytype_report(REPORT_ERROR, NULL, 0, array_type_string, NULL, 0, CAR(n)->type, 0, "Bad argument to splice operator.");
-
#if
0
+
array_type = array_type_string;
+
add_ref(array_type);
} else if ((array_type != CAR(n)->type) && (THIS_COMPILATION->lex.pragmas & ID_STRICT_TYPES) && (Pike_compiler->compiler_pass == COMPILER_PASS_LAST)) {
-
+
struct pike_type *diff_type =
+
type_binop(PT_BINOP_MINUS, CAR(n)->type, array_type_string, 0, 0, 0);
+
if (diff_type) {
yytype_report(REPORT_WARNING, NULL, 0, array_type,
-
NULL, 0,
CAR(n)->
type,
+
NULL, 0,
diff_
type,
0, "Bad argument to splice operator.");
-
#endif
+
free_type(diff_type);
}
-
+
}
/* FIXME: The type field of the splice operator is not yet utilized. * * It probably ought to be something similar to MANY(..., VOID).