Skip to content

Commit 9f0c53c

Browse files
committed
Fix erl_anno:is_anno/1 for end location
1 parent 4911d41 commit 9f0c53c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/stdlib/src/erl_anno.erl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,10 @@ is_anno2(location, Line) when ?LN(Line) ->
219219
true;
220220
is_anno2(location, {Line, Column}) when ?LN(Line), ?COL(Column) ->
221221
true;
222+
is_anno2(end_location, Line) when ?LN(Line) ->
223+
true;
224+
is_anno2(end_location, {Line, Column}) when ?LN(Line), ?COL(Column) ->
225+
true;
222226
is_anno2(generated, true) ->
223227
true;
224228
is_anno2(file, Filename) ->

lib/stdlib/test/erl_anno_SUITE.erl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ is_anno(_Config) ->
103103
true = erl_anno:is_anno(A4),
104104
A5 = erl_anno:set_file(<<"filename">>, A4),
105105
true = erl_anno:is_anno(A5),
106+
A6 = erl_anno:set_end_location({2, 17}, A5),
107+
true = erl_anno:is_anno(A6),
106108
ok.
107109

108110
%% Test 'generated'.

0 commit comments

Comments
 (0)