Fix opaque reporting tests

This commit is contained in:
ayazhafiz 2022-02-23 22:07:52 -05:00
parent ccd4963e0f
commit 822e38d026
3 changed files with 18 additions and 15 deletions

View file

@ -429,12 +429,12 @@ pub fn canonicalize_expr<'a>(
let problem =
roc_problem::can::RuntimeError::OpaqueAppliedToMultipleArgs(region);
env.problem(Problem::RuntimeError(problem.clone()));
(RuntimeError(problem), Output::default())
(RuntimeError(problem), output)
} else {
match scope.lookup_opaque_ref(name, loc_fn.region) {
Err(runtime_error) => {
env.problem(Problem::RuntimeError(runtime_error.clone()));
(RuntimeError(runtime_error), Output::default())
(RuntimeError(runtime_error), output)
}
Ok((name, opaque_def)) => {
let argument = Box::new(args.pop().unwrap());