pike.git/
src/
las.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2022-01-18
2022-01-18 09:52:04 by Henrik Grubbström (Grubba) <grubba@grubba.org>
7cb4f491eac055ba9cb5fe5ad0983c665e4f21c3 (
13
lines) (+
12
/-
1
)
[
Show
|
Annotate
]
Branch:
master
Compiler
[Typechecker]
: Document some special cases.
3738:
check_node_type(CDR(n), CAR(n)->type, "Bad type in assignment."); #else /* !0 */ if (!pike_types_le(CDR(n)->type, CAR(n)->type,
-
PT_FLAG_CMP_VOID_IS_ZERO,
0
)) {
+
PT_FLAG_CMP_VOID_IS_ZERO,
+
PT_FLAG_CMP_VOID_IS_ZERO
)) {
+
/* NB: VOID_IS_ZERO for both a and b above is needed
+
* to support both of the assignments below:
+
*
+
* string|zero foo(string|void bar) {
+
* bar = UNDEFINED;
+
* string|zero ret = bar;
+
* return bar;
+
* }
+
*/
/* a["b"]=c and a->b=c can be valid when a is an array. * * FIXME: Exactly what case is the problem?