summaryrefslogtreecommitdiff
path: root/copy.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-05-01 16:19:03 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2020-05-01 16:19:03 -0400
commitc21fa1738ea08455f906deba2762cdbd591b29ad (patch)
treec7ca6e2e47505144d0470d6080412707b3ea5258 /copy.c
parent5277f2222417b5366e1ef6e0871c90e3946b1742 (diff)
null
Diffstat (limited to 'copy.c')
-rw-r--r--copy.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/copy.c b/copy.c
index e34036c..a8b63a2 100644
--- a/copy.c
+++ b/copy.c
@@ -230,7 +230,8 @@ static inline void copier_ident_translate(Copier *c, Identifier *i) {
/* in must be untyped! */
static void copy_expr(Copier *c, Expression *out, Expression *in) {
Allocator *a = c->allocr;
- *out = *in;
+ *out = *in; /* NOTE : if in the future you are removing this, make sure in->type is still copied for EXPR_VAL,
+ which sometimes exists before typing, e.g. for null */
assert(!(in->flags & EXPR_FOUND_TYPE));
switch (in->kind) {
case EXPR_LITERAL_FLOAT: