mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
Restore UNNCESSARY DEFINITION errors for top-level defs
Non-top-level defs are already covered
This commit is contained in:
parent
a4296ca19d
commit
bc0cfef128
4 changed files with 80 additions and 1 deletions
|
@ -195,6 +195,7 @@ pub enum Problem {
|
|||
unbound_symbol: Symbol,
|
||||
region: Region,
|
||||
},
|
||||
NoIdentifiersIntroduced(Region),
|
||||
OverloadedSpecialization {
|
||||
overload: Region,
|
||||
original_opaque: Symbol,
|
||||
|
@ -317,6 +318,7 @@ impl Problem {
|
|||
Problem::ImplementsNonRequired { .. } => Warning,
|
||||
Problem::DoesNotImplementAbility { .. } => RuntimeError,
|
||||
Problem::NotBoundInAllPatterns { .. } => RuntimeError,
|
||||
Problem::NoIdentifiersIntroduced(_) => Warning,
|
||||
Problem::OverloadedSpecialization { .. } => Warning, // Ideally, will compile
|
||||
Problem::UnnecessaryOutputWildcard { .. } => Warning,
|
||||
// TODO: sometimes this can just be a warning, e.g. if you have [1, .., .., 2] but we
|
||||
|
@ -480,6 +482,7 @@ impl Problem {
|
|||
}
|
||||
| Problem::NotAnAbility(region)
|
||||
| Problem::ImplementsNonRequired { region, .. }
|
||||
| Problem::NoIdentifiersIntroduced(region)
|
||||
| Problem::DoesNotImplementAbility { region, .. }
|
||||
| Problem::OverloadedSpecialization {
|
||||
overload: region, ..
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue