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:
parent
502a13756a
commit
22b618116e
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue