mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Many commented out report tests and report_problem_as helper
This commit is contained in:
parent
221581432a
commit
da4e97fd25
3 changed files with 159 additions and 121 deletions
|
@ -1,5 +1,6 @@
|
|||
use crate::report::ReportText::{Batch, Module, Region, Value};
|
||||
use roc_module::symbol::{Interns, ModuleId, Symbol};
|
||||
use roc_problem::can::PrecedenceProblem::BothNonAssociative;
|
||||
use roc_problem::can::Problem;
|
||||
use roc_types::pretty_print::content_to_string;
|
||||
use roc_types::subs::{Content, Subs};
|
||||
|
@ -119,6 +120,24 @@ pub fn can_problem(filename: PathBuf, problem: Problem) -> Report {
|
|||
texts.push(Value(argument_symbol));
|
||||
texts.push(plain_text("\". Adding an underscore at the start of a variable name is a way of saying that the variable is not used."));
|
||||
}
|
||||
Problem::PrecedenceProblem(BothNonAssociative(
|
||||
_left_symbol,
|
||||
_left_bin_op,
|
||||
_middle_symbol,
|
||||
_right_bin_op,
|
||||
_right_symbol,
|
||||
)) => panic!("TODO implement precedence problem report"),
|
||||
Problem::UnsupportedPattern(_pattern_type, _region) => {
|
||||
panic!("TODO implement unsupported pattern report")
|
||||
}
|
||||
Problem::ShadowingInAnnotation {
|
||||
original_region,
|
||||
shadow,
|
||||
} => {
|
||||
let _a = original_region;
|
||||
let _b = shadow;
|
||||
panic!("TODO implement shadow report")
|
||||
}
|
||||
_ => {
|
||||
panic!("TODO implement others");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue