mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Report exposed-but-not-defined symbols
This commit is contained in:
parent
14288d5aa6
commit
ed222912b3
3 changed files with 16 additions and 2 deletions
|
@ -37,6 +37,19 @@ pub fn can_problem<'b>(
|
|||
alloc.module(module_id),
|
||||
alloc.reflow(" isn't used, you don't need to import it."),
|
||||
]),
|
||||
Problem::ExposedButNotDefined(symbol) => {
|
||||
alloc.stack(vec![
|
||||
alloc
|
||||
.symbol_unqualified(symbol)
|
||||
.append(alloc.reflow(" is listed as exposed, but it isn't defined in this module.")),
|
||||
alloc
|
||||
.reflow("You can fix this by adding a definition for ")
|
||||
.append(alloc.symbol_unqualified(symbol))
|
||||
.append(alloc.reflow(", or by removing it from "))
|
||||
.append(alloc.keyword("exposes"))
|
||||
.append(alloc.reflow("."))
|
||||
])
|
||||
}
|
||||
Problem::UnusedArgument(closure_symbol, argument_symbol, region) => {
|
||||
let line = "\". Adding an underscore at the start of a variable name is a way of saying that the variable is not used.";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue