mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 00:24:34 +00:00
better debug messages
This commit is contained in:
parent
ffd4566c29
commit
4dafe08544
1 changed files with 10 additions and 2 deletions
|
@ -2466,7 +2466,10 @@ fn foo<'a>(
|
||||||
(info, parse_state)
|
(info, parse_state)
|
||||||
}
|
}
|
||||||
Ok(_) => panic!("invalid header format for builtin module"),
|
Ok(_) => panic!("invalid header format for builtin module"),
|
||||||
Err(e) => todo!(),
|
Err(e) => panic!(
|
||||||
|
"Hit a parse error in the header of {:?}:\n{:?}",
|
||||||
|
filename, e
|
||||||
|
),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4145,10 +4148,15 @@ fn add_def_to_module<'a>(
|
||||||
arguments: loc_args,
|
arguments: loc_args,
|
||||||
loc_body,
|
loc_body,
|
||||||
captured_symbols,
|
captured_symbols,
|
||||||
|
name,
|
||||||
..
|
..
|
||||||
}) => {
|
}) => {
|
||||||
// this is a top-level definition, it should not capture anything
|
// this is a top-level definition, it should not capture anything
|
||||||
debug_assert!(captured_symbols.is_empty());
|
debug_assert!(
|
||||||
|
captured_symbols.is_empty(),
|
||||||
|
"{:?}",
|
||||||
|
(symbol, name, symbol.module_id(), &captured_symbols)
|
||||||
|
);
|
||||||
|
|
||||||
// If this is an exposed symbol, we need to
|
// If this is an exposed symbol, we need to
|
||||||
// register it as such. Otherwise, since it
|
// register it as such. Otherwise, since it
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue