---
source: compiler-core/src/erlang/tests.rs
expression: "pub type Point { Point(x: Int, y: Int) }\npub fn x(y) { let Point(a, b) = y a }"
---
----- SOURCE CODE
pub type Point { Point(x: Int, y: Int) }
pub fn x(y) { let Point(a, b) = y a }

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

-type point() :: {point, integer(), integer()}.

-file("project/test/my/mod.gleam", 2).
-spec x(point()) -> integer().
x(Y) ->
    {point, A, B} = Y,
    A.
