mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-22 00:09:33 +03:00
Fix order of alias arg discovery
This commit is contained in:
parent
cc677917a7
commit
28768bcfba
@ -2454,12 +2454,13 @@ fn count_generated_name_usages<'a>(
|
||||
stack.push((ret, false));
|
||||
}
|
||||
Alias(_, args, real, _) => {
|
||||
// First, count the occurrences in the real var
|
||||
stack.push((real, false));
|
||||
// Then, count up any phantom args that were missed b/c they're not referenced in
|
||||
// the real var. Set `only_unseen` so that we don not double-count vars that do
|
||||
// appear in the real var.
|
||||
stack.extend(args.iter().map(|t| (t, true)));
|
||||
|
||||
// First, count the occurrences in the real var
|
||||
stack.push((real, false));
|
||||
}
|
||||
Infinite | Error => {}
|
||||
Range(_) => {}
|
||||
|
@ -1330,7 +1330,7 @@ mod test_reporting {
|
||||
|
||||
This `bar` value is a:
|
||||
|
||||
{ bar : Int * }
|
||||
{ bar : Int a }
|
||||
|
||||
But `f` needs its 1st argument to be:
|
||||
|
||||
@ -1398,7 +1398,7 @@ mod test_reporting {
|
||||
|
||||
This `Blue` tag application has the type:
|
||||
|
||||
[Blue (Frac *)]
|
||||
[Blue (Frac a)]
|
||||
|
||||
But `f` needs its 1st argument to be:
|
||||
|
||||
@ -2788,7 +2788,7 @@ mod test_reporting {
|
||||
|
||||
The argument is a record of type:
|
||||
|
||||
{ y : Frac * }
|
||||
{ y : Frac a }
|
||||
|
||||
But `f` needs its 1st argument to be:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user