mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +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
|
@ -1267,6 +1267,14 @@ fn canonicalize_value_defs<'a>(
|
|||
|
||||
output = temp_output.output;
|
||||
|
||||
if let (PatternType::TopLevelDef, DefKind::Ignored(_)) =
|
||||
(pattern_type, temp_output.def.kind)
|
||||
{
|
||||
env.problems.push(Problem::NoIdentifiersIntroduced(
|
||||
temp_output.def.loc_pattern.region,
|
||||
))
|
||||
}
|
||||
|
||||
defs.push(Some(temp_output.def));
|
||||
|
||||
def_ordering.insert_symbol_references(def_id as u32, &temp_output.references)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue