mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
add ListLiteralElement
This commit is contained in:
parent
82924d70e9
commit
8e7aef314a
7 changed files with 103 additions and 36 deletions
|
@ -740,7 +740,15 @@ impl<'a> BorrowInfState<'a> {
|
|||
use Expr::*;
|
||||
|
||||
match e {
|
||||
Tag { arguments: xs, .. } | Struct(xs) | Array { elems: xs, .. } => {
|
||||
Array { elems: xs, .. } => {
|
||||
let xs = Vec::from_iter_in(xs.iter().filter_map(|e| e.to_symbol()), self.arena);
|
||||
self.own_var(z);
|
||||
|
||||
// if the used symbol is an argument to the current function,
|
||||
// the function must take it as an owned parameter
|
||||
self.own_args_if_param(&xs);
|
||||
}
|
||||
Tag { arguments: xs, .. } | Struct(xs) => {
|
||||
self.own_var(z);
|
||||
|
||||
// if the used symbol is an argument to the current function,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue