mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Report self-recursive aliases at their declaration site, not in usages
Closes #2380
This commit is contained in:
parent
bec222b0c3
commit
48a3e871e8
4 changed files with 92 additions and 65 deletions
|
@ -886,6 +886,9 @@ fn symbols_help(tipe: &Type, accum: &mut ImSet<Symbol>) {
|
|||
accum.insert(*symbol);
|
||||
args.iter().for_each(|arg| symbols_help(arg, accum));
|
||||
}
|
||||
Erroneous(Problem::CyclicAlias(alias, _, _)) => {
|
||||
accum.insert(*alias);
|
||||
}
|
||||
EmptyRec | EmptyTagUnion | ClosureTag { .. } | Erroneous(_) | Variable(_) => {}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue