pike.git/
src/
pike_types.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2022-04-06
2022-04-06 14:41:40 by Henrik Grubbström (Grubba) <grubba@grubba.org>
45627b3c22f27e55ad5a8076e4ddaa005aacc4d7 (
17
lines) (+
14
/-
3
)
[
Show
|
Annotate
]
Branch:
master
Compiler
[Typechecker]
: Added PT_FLAG_REMAP_KEEP_MARKERS.
4286:
if (value) { push_remap_markers(value, remap, flags); free_type(value);
+
if (marker && (flags & PT_FLAG_REMAP_KEEP_MARKERS)) {
+
push_type(marker);
+
push_type(T_OR);
+
}
} else if (flags & PT_FLAG_REMAP_EVAL_MARKERS) {
-
/* Marker without matching assign. *
/
-
/
*
FIXME
:
Report
error?
*/
-
push_type(T_
MIXED
);
+
/* Marker without matching assign.
+
*
NB: Not an error. Consider
+
*
+
* function($0 = mixed...
:
$0|float)
+
*
+
* when evaluating the $0|float to get the
+
* return value, $0 will not be bound.
+
*
/
+
push_type(
PIKE_
T_
UNKNOWN
);
} else { /* Remap the marker. */