rename function argument for clarity

is_assignment was a bit confusing to me since we do actually categorize expect as 'assignment'. So this is more about whether this is a *let* assignment. Hence 'is_let'.
This commit is contained in:
KtorZ 2024-03-13 13:07:07 +01:00 committed by rvcas
parent 502a13756a
commit 22b618116e
No known key found for this signature in database
GPG Key ID: C09B64E263F7D68C
1 changed files with 2 additions and 2 deletions

View File

@ -141,11 +141,11 @@ impl<'a, 'b> PatternTyper<'a, 'b> {
pattern: UntypedPattern,
tipo: Rc<Type>,
ann_type: Option<Rc<Type>>,
is_assignment: bool,
is_let: bool,
) -> Result<TypedPattern, Error> {
match pattern {
Pattern::Discard { name, location } => {
if is_assignment {
if is_let {
// Register declaration for the unused variable detection
self.environment
.warnings