aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2015-06-02 14:49:46 +0200
committerHenrik Nord <[email protected]>2015-06-02 14:49:50 +0200
commit65bf43e82a8ec731aafdbac74d41d65b63c7f49c (patch)
tree03b6f9aa90c7cf608f44ebcaf41ab981ab9e4acb /lib/stdlib/src
parent237353645b9b290038ba70250747b2ea07488625 (diff)
parentf9af336d89b3ec6b68182311ef4d77d1eabc455f (diff)
downloadotp-65bf43e82a8ec731aafdbac74d41d65b63c7f49c.tar.gz
otp-65bf43e82a8ec731aafdbac74d41d65b63c7f49c.tar.bz2
otp-65bf43e82a8ec731aafdbac74d41d65b63c7f49c.zip
Merge branch 'josevalim/jv-annotate-form-type'
* josevalim/jv-annotate-form-type: Annotate used types in erl_lint OTP-12800
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/erl_lint.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl
index ac92004061..b13848c501 100644
--- a/lib/stdlib/src/erl_lint.erl
+++ b/lib/stdlib/src/erl_lint.erl
@@ -2843,10 +2843,9 @@ check_record_types([{type, _, field_type, [{atom, AL, FName}, Type]}|Left],
check_record_types([], _Name, _DefFields, SeenVars, St, _SeenFields) ->
{SeenVars, St}.
-used_type(TypePair, L, St) ->
- Usage = St#lint.usage,
+used_type(TypePair, L, #lint{usage = Usage, file = File} = St) ->
OldUsed = Usage#usage.used_types,
- UsedTypes = dict:store(TypePair, L, OldUsed),
+ UsedTypes = dict:store(TypePair, erl_anno:set_file(File, L), OldUsed),
St#lint{usage=Usage#usage{used_types=UsedTypes}}.
is_default_type({Name, NumberOfTypeVariables}) ->