pike.git/
src/
pike_types.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2021-01-30
2021-01-30 13:40:56 by Henrik Grubbström (Grubba) <grubba@grubba.org>
f94e4351935533f7d5412fa52f075183fd4dbc10 (
10
lines) (+
6
/-
4
)
[
Show
|
Annotate
]
Branch:
master
Compiler
[Typechecker]
: More robustness against NULL types.
2444:
simple_describe_type(s); fprintf(stderr, ")"); } else {
-
if (s->car->type != T_VOID) {
+
if (
!
s->car
|| (s
->
car->
type != T_VOID)
)
{
simple_describe_type(s->car); fprintf(stderr, "..."); }
7691:
} /* check the 'many' type */
-
if(b->car->type != T_VOID &&
-
a->car->type != T_VOID)
+
if(b->car
&& (b
->
car->
type != T_VOID
)
&&
+
a->car
&& (a
->
car->
type != T_VOID)
)
{ if(!(tmp = low_match_types(a->car, b->car, (flags | NO_MAX_ARGS) & ~(A_EXACT|B_EXACT)))) {
8530:
/* FALLTHRU */ case TWOT(T_MANY, T_MANY): /* check the 'many' type */
-
if ((a->car->type != T_VOID) && (b->car->type != T_VOID)) {
+
if (
a->car &&
(a->car->type != T_VOID) &&
+
b->car &&
(b->car->type != T_VOID)) {
/* Note: flags never has grouping at this point. */ if (!low_pike_types_le(b->car, a->car, 0, flags ^ LE_A_B_SWAPPED)) { return 0;