mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
desugar no args correctly e.g. Stdin.line!
This commit is contained in:
parent
5e2fc1c3fd
commit
4035221dac
2 changed files with 9 additions and 0 deletions
|
@ -601,11 +601,17 @@ impl<'a> Defs<'a> {
|
|||
let index = value_index.index();
|
||||
|
||||
if let ValueDef::Body(_, expr) = &self.value_defs[index] {
|
||||
// The Suffixed has arguments applied e.g. `Stdout.line! "Hello World"`
|
||||
if let Expr::Apply(sub_expr, _, _) = expr.value {
|
||||
if let Expr::Suffixed(_) = sub_expr.value {
|
||||
return Some((tag_index, index));
|
||||
}
|
||||
}
|
||||
|
||||
// The Suffixed has NO arguments applied e.g. `Stdin.line!`
|
||||
if let Expr::Suffixed(_) = expr.value {
|
||||
return Some((tag_index, index));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue