-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from inaka/jfacorro.23.no.records.in.specs
[Closes #23] No specs with records.
- Loading branch information
Showing
5 changed files
with
111 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
-module(fail_no_spec_with_records). | ||
|
||
-export([ | ||
function_1/1, | ||
function_2/2, | ||
function_3/2, | ||
function_4/2, | ||
function_5/1 | ||
]). | ||
|
||
-record(state, {}). | ||
|
||
-spec function_1(atom()) -> atom(). | ||
function_1(Arg) -> | ||
Arg. | ||
|
||
-spec function_2(atom(), atom()) -> #state{}. | ||
function_2(_Arg1, _Arg2) -> | ||
ok. | ||
|
||
-spec function_3(atom(), #state{}) -> atom(). | ||
function_3(_Arg1, _Arg2) -> | ||
ok. | ||
|
||
-spec function_4(atom(), integer()) -> atom(). | ||
function_4(_Arg1, _Arg2) -> | ||
ok. | ||
|
||
-spec function_5(#state{}) -> ok. | ||
function_5(_Arg1) -> | ||
ok. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
-module(pass_no_spec_with_records). | ||
|
||
-export([ | ||
function_1/1, | ||
function_2/2, | ||
function_3/2 | ||
]). | ||
|
||
-record(state, {}). | ||
|
||
-spec function_1(atom()) -> atom(). | ||
function_1(Arg) -> | ||
Arg. | ||
|
||
-spec function_2(atom(), atom()) -> #{}. | ||
function_2(_Arg1, _Arg2) -> | ||
#state{}. | ||
|
||
-spec function_3(atom(), ok | error) -> atom(). | ||
function_3(_Arg1, _Arg2) -> | ||
ok. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters