add ListLiteralElement

This commit is contained in:
Folkert 2021-09-05 16:36:18 +02:00
parent 82924d70e9
commit 8e7aef314a
7 changed files with 103 additions and 36 deletions

View file

@ -8,7 +8,9 @@ use roc_collections::all::{MutMap, MutSet};
use roc_module::ident::{ModuleName, TagName};
use roc_module::low_level::LowLevel;
use roc_module::symbol::{Interns, Symbol};
use roc_mono::ir::{BranchInfo, CallType, Expr, JoinPointId, Literal, Proc, Stmt};
use roc_mono::ir::{
BranchInfo, CallType, Expr, JoinPointId, ListLiteralElement, Literal, Proc, Stmt,
};
use roc_mono::layout::{Builtin, Layout, LayoutIds};
use target_lexicon::Triple;
@ -601,8 +603,10 @@ where
self.set_last_seen(*structure, stmt);
}
Expr::Array { elems, .. } => {
for sym in *elems {
self.set_last_seen(*sym, stmt);
for elem in *elems {
if let ListLiteralElement::Symbol(sym) = elem {
self.set_last_seen(*sym, stmt);
}
}
}
Expr::Reuse {