Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return the highest priority error from the descendant instead of return the very first one #25552

Merged
merged 1 commit into from Jan 20, 2020
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -633,6 +633,7 @@ impl ModuleTree {
}

// 5-6.
let mut errors: Vec<ModuleError> = Vec::new();
let descendant_urls = module_tree.get_descendant_urls().borrow();

for descendant_module in descendant_urls
@@ -650,13 +651,13 @@ impl ModuleTree {
ModuleTree::find_first_parse_error(&global, &descendant_module, discovered_urls);

// 8-4.
if child_parse_error.is_some() {
return child_parse_error;
if let Some(child_error) = child_parse_error {
errors.push(child_error);
}
}

// Step 9.
return None;
return errors.into_iter().max();
}
}

This file was deleted.

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.