8000 [BUG] Compiler doesn't warn about unused `var` binding created by walrus operator · Issue #4740 · modular/modular · GitHub
[go: up one dir, main page]

Skip to content
[BUG] Compiler doesn't warn about unused var binding created by walrus operator #4740
@soraros

Description

@soraros

Bug description

As title. CC @lattner.

Steps to reproduce

fn main():
  print(a := String())      # no warning
  print(ref b := String())  # warning: ref 'b' was never used, remove it?

System information

Mojo 25.4.0.dev2025060220 (d9421ccb)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmojoIssues that are related to mojo

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0