pike.git/
src/
las.c
Branch:
Tag:
Non-build tags
All tags
No tags
1999-12-21
1999-12-21 20:41:11 by Henrik Grubbström (Grubba) <grubba@grubba.org>
5986043b7a1446e4d7d1dc6f6c556b16ca1d7c8e (
15
lines) (+
12
/-
3
)
[
Show
|
Annotate
]
Branch:
7.9
Now uses check_soft_cast().
Rev: src/las.c:1.146
5:
\*/ /**/ #include "global.h"
-
RCSID("$Id: las.c,v 1.
145
1999/12/
19
14
:
57
:
36
grubba Exp $");
+
RCSID("$Id: las.c,v 1.
146
1999/12/
21
20
:
41
:
11
grubba Exp $");
#include "language.h" #include "interpret.h"
968:
} if (n->type) {
-
if (!
pike
_
types
_
le
(type, n->type)) {
+
if (!
check
_
soft
_
cast
(type, n->type)) {
struct pike_string *t1 = describe_type(type); struct pike_string *t2 = describe_type(n->type); yywarning("Soft cast to %s isn't a restriction of %s.",
976:
free_string(t2); free_string(t1); }
+
/* FIXME: check_soft_cast() is weaker than pike_types_le()
+
* The resulting type should probably be the and between the old
+
* and the new type.
+
*/
} res = mkemptynode(); res->token = F_SOFT_CAST;
2148:
{ case F_SOFT_CAST: if (CAR(n) && CAR(n)->type) {
-
if (!
pike
_
types
_
le
(old_type, CAR(n)->type)) {
+
if (!
check
_
soft
_
cast
(old_type, CAR(n)->type)) {
struct pike_string *t1 = describe_type(old_type); struct pike_string *t2 = describe_type(CAR(n)->type); yywarning("Soft cast to %s isn't a restriction of %s.",
2156:
free_string(t2); free_string(t1); }
+
/* FIXME: check_soft_cast() is weaker than pike_types_le()
+
* The resulting type should probably be the and between the old
+
* and the new type.
+
*/
} /* FALL_THROUGH */ case F_CAST: