aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/opaque_SUITE_data/src/union/union_use.erl
blob: 6a103279cd406638e7445908c3194add30f95a75 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
-module(union_use).

-export([test/1, wrong_a/0, wrong_rec/0]).

test(X) ->
  case union_adt:new(X) of
    A when is_atom(A)  -> atom;
    T when is_tuple(T) -> tuple
  end.

wrong_a() ->
  aaa = union_adt:new_a(a),
  ok.

wrong_rec() ->
  is_tuple(union_adt:new_rec(42)).