mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Fix repl tests
This commit is contained in:
parent
c5d918e68c
commit
364d2585df
2 changed files with 6 additions and 3 deletions
|
@ -9,7 +9,7 @@ use roc_types::types::{ErrorType, Mismatch, RecordField};
|
||||||
|
|
||||||
macro_rules! mismatch {
|
macro_rules! mismatch {
|
||||||
() => {{
|
() => {{
|
||||||
if cfg!(debug_assertions) {
|
if cfg!(debug_assertions) && std::env::var("ROC_PRINT_MISMATCHES").is_some() {
|
||||||
println!(
|
println!(
|
||||||
"Mismatch in {} Line {} Column {}",
|
"Mismatch in {} Line {} Column {}",
|
||||||
file!(),
|
file!(),
|
||||||
|
@ -21,7 +21,7 @@ macro_rules! mismatch {
|
||||||
vec![Mismatch::TypeMismatch]
|
vec![Mismatch::TypeMismatch]
|
||||||
}};
|
}};
|
||||||
($msg:expr) => {{
|
($msg:expr) => {{
|
||||||
if cfg!(debug_assertions) {
|
if cfg!(debug_assertions) && std::env::var("ROC_PRINT_MISMATCHES").is_ok() {
|
||||||
println!(
|
println!(
|
||||||
"Mismatch in {} Line {} Column {}",
|
"Mismatch in {} Line {} Column {}",
|
||||||
file!(),
|
file!(),
|
||||||
|
@ -39,7 +39,7 @@ macro_rules! mismatch {
|
||||||
mismatch!($msg)
|
mismatch!($msg)
|
||||||
}};
|
}};
|
||||||
($msg:expr, $($arg:tt)*) => {{
|
($msg:expr, $($arg:tt)*) => {{
|
||||||
if cfg!(debug_assertions) {
|
if cfg!(debug_assertions) && std::env::var("ROC_PRINT_MISMATCHES").is_ok() {
|
||||||
println!(
|
println!(
|
||||||
"Mismatch in {} Line {} Column {}",
|
"Mismatch in {} Line {} Column {}",
|
||||||
file!(),
|
file!(),
|
||||||
|
|
|
@ -1166,6 +1166,9 @@ fn num_to_ast<'a, A: ReplApp>(
|
||||||
|
|
||||||
num_to_ast(env, num_expr, content)
|
num_to_ast(env, num_expr, content)
|
||||||
}
|
}
|
||||||
|
RangedNumber(typ, _) => {
|
||||||
|
num_to_ast(env, num_expr, env.subs.get_content_without_compacting(*typ))
|
||||||
|
}
|
||||||
other => {
|
other => {
|
||||||
panic!("Unexpected FlatType {:?} in num_to_ast", other);
|
panic!("Unexpected FlatType {:?} in num_to_ast", other);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue