Make unit assignment optional for suffixed defs

This commit is contained in:
Luke Boswell 2024-03-23 14:40:28 +11:00
parent 237bd942ed
commit 42fdcb7ff1
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
15 changed files with 208 additions and 7 deletions

View file

@ -1093,6 +1093,8 @@ fn desugar_pattern<'a>(
SpaceAfter(sub_pattern, _spaces) => {
desugar_pattern(arena, *sub_pattern, src, line_info, module_path)
}
Stmt(_) => unreachable!("should have been handled in the parser"),
}
}

View file

@ -6,6 +6,7 @@ use crate::num::{
ParsedNumResult,
};
use crate::scope::{PendingAbilitiesInScope, Scope};
use roc_error_macros::internal_error;
use roc_exhaustive::ListArity;
use roc_module::ident::{Ident, Lowercase, TagName};
use roc_module::symbol::Symbol;
@ -882,6 +883,8 @@ pub fn canonicalize_pattern<'a>(
let problem = MalformedPatternProblem::QualifiedIdentifier;
malformed_pattern(env, problem, region)
}
Stmt(_) => internal_error!("should have been handled in the parser"),
};
Loc {