---
source: compiler-core/src/erlang/tests.rs
expression: "fn id(x) {\n  x\n}\n\npub fn bool_expr(x, y) {\n  y || x |> id\n}"
---
----- SOURCE CODE
fn id(x) {
  x
}

pub fn bool_expr(x, y) {
  y || x |> id
}

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

-file("project/test/my/mod.gleam", 1).
-spec id(I) -> I.
id(X) ->
    X.

-file("project/test/my/mod.gleam", 5).
-spec bool_expr(boolean(), boolean()) -> boolean().
bool_expr(X, Y) ->
    Y orelse begin
        _pipe = X,
        id(_pipe)
    end.
