File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11-module (map_comprehension_fail ).
22
3+ -ifdef (OTP_RELEASE ).
4+ -if (? OTP_RELEASE >= 27 ).
5+
36% % Each exported function should produce exactly one type error.
47
58-export ([mc_wrong_return_type /0 , map_gen_not_map /1 ]).
@@ -13,3 +16,6 @@ mc_wrong_return_type() ->
1316-spec map_gen_not_map (integer ()) -> [integer ()].
1417map_gen_not_map (N ) ->
1518 [V || _K := V <- N ].
19+
20+ -endif . % % OTP >= 27
21+ -endif . % % OTP_RELEASE
Original file line number Diff line number Diff line change 11-module (sigils_fail ).
22
3+ -ifdef (OTP_RELEASE ).
4+ -if (? OTP_RELEASE >= 27 ).
5+
36% % Each exported function should produce exactly one type error.
47
58-export ([sigil_wrong_type /0 ]).
811-spec sigil_wrong_type () -> integer ().
912sigil_wrong_type () ->
1013 ~ " hello" .
14+
15+ -endif . % % OTP >= 27
16+ -endif . % % OTP_RELEASE
Original file line number Diff line number Diff line change 11-module (map_comprehension_pass ).
22
3+ -ifdef (OTP_RELEASE ).
4+ -if (? OTP_RELEASE >= 27 ).
5+
36-compile ([export_all , nowarn_export_all ]).
47
58% % Basic map comprehension with list generator
@@ -61,3 +64,6 @@ mc_any_map() ->
6164-spec mixed_generators (#{atom () => integer ()}) -> [{integer (), atom ()}].
6265mixed_generators (M ) ->
6366 [{V , K } || K := V <- M ].
67+
68+ -endif . % % OTP >= 27
69+ -endif . % % OTP_RELEASE
Original file line number Diff line number Diff line change 11-module (sigils_and_doc_pass ).
22
3+ -ifdef (OTP_RELEASE ).
4+ -if (? OTP_RELEASE >= 27 ).
5+
36-compile ([export_all , nowarn_export_all ]).
47
58% % -doc attribute (OTP 27+)
@@ -33,3 +36,6 @@ sigil_concat() ->
3336-spec sigil_arg () -> non_neg_integer ().
3437sigil_arg () ->
3538 byte_size (~ " hello" ).
39+
40+ -endif . % % OTP >= 27
41+ -endif . % % OTP_RELEASE
You can’t perform that action at this time.
0 commit comments