aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/erl_lint.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-12-04 10:29:46 +0100
committerBjörn Gustavsson <[email protected]>2015-12-04 10:29:46 +0100
commit2c2c82d71dd038b347674c31e6b117bc0fec8e2b (patch)
treecc83c26bc206a474a9f408e2a81aa82abf3337ee /lib/stdlib/src/erl_lint.erl
parent04bbaa2118eaa4c98ac485f142923e9f1258da5a (diff)
parent7b57b86a78f668747cc28e1820a0e6e8474111ea (diff)
downloadotp-2c2c82d71dd038b347674c31e6b117bc0fec8e2b.tar.gz
otp-2c2c82d71dd038b347674c31e6b117bc0fec8e2b.tar.bz2
otp-2c2c82d71dd038b347674c31e6b117bc0fec8e2b.zip
Merge branch 'maint'
* maint: Extend erl_lint:format_error/1 to handle bittype mismatches erl_lint_SUITE: Add smoke test of format_error/1
Diffstat (limited to 'lib/stdlib/src/erl_lint.erl')
-rw-r--r--lib/stdlib/src/erl_lint.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl
index 69eff615b4..4a4019b8bd 100644
--- a/lib/stdlib/src/erl_lint.erl
+++ b/lib/stdlib/src/erl_lint.erl
@@ -292,6 +292,9 @@ format_error({variable_in_record_def,V}) ->
%% --- binaries ---
format_error({undefined_bittype,Type}) ->
io_lib:format("bit type ~w undefined", [Type]);
+format_error({bittype_mismatch,Val1,Val2,What}) ->
+ io_lib:format("conflict in ~s specification for bit field: '~p' and '~p'",
+ [What,Val1,Val2]);
format_error(bittype_unit) ->
"a bit unit size must not be specified unless a size is specified too";
format_error(illegal_bitsize) ->