---
source: compiler-core/src/erlang/tests.rs
expression: "\npub fn main(args) {\n  case args {\n    _ -> {\n      let a = 1\n      a\n    }\n  }\n  let a = 2\n  a\n}\n"
---
----- SOURCE CODE

pub fn main(args) {
  case args {
    _ -> {
      let a = 1
      a
    }
  }
  let a = 2
  a
}


----- COMPILED ERLANG
-module(my@mod).
-compile([no_auto_import, nowarn_ignored, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-export([main/1]).

-file("project/test/my/mod.gleam", 2).
-spec main(any()) -> integer().
main(Args) ->
    case Args of
        _ ->
            A = 1,
            A
    end,
    A@1 = 2,
    A@1.
