pike.git/
src/
las.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2020-03-12
2020-03-12 13:08:14 by Henrik Grubbström (Grubba) <grubba@grubba.org>
83b9f5b4afa97bdabc0c509e63358626927e8330 (
18
lines) (+
15
/-
3
)
[
Show
|
Annotate
]
Branch:
master
Compiler: Reduce the number of soft cast warnings.
Fixes some of
#10006
.
4611:
if (new->type && ((new->type->type == PIKE_T_INT) || (new->type->type == PIKE_T_TYPE))) { /* Ok. */
-
} else if (n->type
&&
(!new->type
||
!pike_types_le(new->type, n->type))
)
{
+
} else if (n->type
)
{
+
if
(!new->type
)
{
+
new->type = n->type;
+
add_ref(n->type);
+
} else if (
!pike_types_le(new->type, n->type)) {
/* Try consolidating the type information. */
-
+
struct pike_type *t = soft_cast(n->type, new->type, 0);
+
if (t) {
+
free_type(new->type);
+
new->type = t;
+
} else {
new = mksoftcastnode(n->type, new); }
-
+
}
+
}
free_node(n); n = new; pop_stack();