diff options
author | Henrik Nord <[email protected]> | 2015-06-02 14:49:46 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2015-06-02 14:49:50 +0200 |
commit | 65bf43e82a8ec731aafdbac74d41d65b63c7f49c (patch) | |
tree | 03b6f9aa90c7cf608f44ebcaf41ab981ab9e4acb | |
parent | 237353645b9b290038ba70250747b2ea07488625 (diff) | |
parent | f9af336d89b3ec6b68182311ef4d77d1eabc455f (diff) | |
download | otp-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
-rw-r--r-- | lib/stdlib/src/erl_lint.erl | 5 |
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}) -> |