blob: 5c5bf3fbffd951eb27f8e6271b4f86f84407a2c0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
-module(gen_server_not_exported).
-behaviour(gen_server).
-export([main/0, handle_call/3]).
%% Not exported. Should be a warning.
main() ->
_ = init(whatever),
_ = handle_cast(whatever, some_state),
_ = format_status(<<"xyz">>),
ok.
init(_) ->
ok.
%% OK. No warning.
handle_call(_Request, _From, State) ->
{noreply, State}.
%% Not exported. Should be a warning.
-spec handle_cast(any(), any()) -> binary().
handle_cast(_Request, _State) ->
<<"abc">>.
%% Not exported and conflicting arguments and return value. No warning
%% since format_status/1 is an optional callback.
-spec format_status(binary()) -> binary().
format_status(Bin) when is_binary(Bin) ->
Bin.
|