pike.git/
src/
pike_types.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2021-12-07
2021-12-07 10:27:51 by Henrik Grubbström (Grubba) <grubba@grubba.org>
2e9927217122ba8c846d51a9c10404d002a9aa31 (
8
lines) (+
4
/-
4
)
[
Show
|
Annotate
]
Branch:
master
Compiler
[Typechecker]
: Improved handling of PT_BINOP_MINUS.
4804:
/* Check implicit casting. */ loop: switch(TWOT(a->type & PIKE_T_MASK, b->type & PIKE_T_MASK)) {
+
case TWOT(T_PROGRAM, T_TYPE):
+
case TWOT(T_PROGRAM, T_PROGRAM):
case TWOT(T_PROGRAM, T_FUNCTION): case TWOT(T_PROGRAM, T_MANY): aret = a->car;
5188:
} break;
-
/* T_TYPE and T_PROGRAM are essentially the same thing. */
+
case TWOT(T_TYPE, T_TYPE):
-
case TWOT(T_TYPE, T_PROGRAM):
-
case TWOT(T_PROGRAM, T_TYPE):
-
case TWOT(T_PROGRAM, T_PROGRAM):
+
tmp = low_type_binop(op, a->car, b->car, remap, 0, 0, remap_flags); if (!tmp) return NULL;
5207:
free_type(tmp); return pop_unfinished_type();
+
case TWOT(T_TYPE, T_PROGRAM):
case TWOT(T_TYPE, T_FUNCTION): case TWOT(T_TYPE, T_MANY): case TWOT(T_TYPE, PIKE_T_TRANSITIVE):