mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Report an error for lookups of unexposed values
This commit is contained in:
parent
7b09232911
commit
572c7cb3dd
3 changed files with 88 additions and 73 deletions
|
@ -29,6 +29,22 @@ pub fn type_problem<'b>(
|
|||
CircularType(region, symbol, overall_type) => {
|
||||
to_circular_report(alloc, filename, region, symbol, overall_type)
|
||||
}
|
||||
UnexposedLookup(symbol) => {
|
||||
let title = "UNRECOGNIZED NAME".to_string();
|
||||
let doc = alloc
|
||||
.stack(vec![alloc
|
||||
.reflow("The ")
|
||||
.append(alloc.module(symbol.module_id()))
|
||||
.append(alloc.reflow(" module does not expose anything by the name "))
|
||||
.append(alloc.symbol_unqualified(symbol))])
|
||||
.append(alloc.reflow("."));
|
||||
|
||||
Report {
|
||||
filename,
|
||||
title,
|
||||
doc,
|
||||
}
|
||||
}
|
||||
BadType(type_problem) => {
|
||||
use roc_types::types::Problem::*;
|
||||
match type_problem {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue