diff options
author | Björn Gustavsson <[email protected]> | 2015-12-04 10:27:33 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-12-04 10:27:33 +0100 |
commit | 7b57b86a78f668747cc28e1820a0e6e8474111ea (patch) | |
tree | 21e706bf4d101fe48ae6db17593efa0895da2a8a /lib/stdlib/src/erl_lint.erl | |
parent | 646d3d24a9031c96f726b9a2c715b6da144334c8 (diff) | |
parent | b7514ce549fc8865a2200c44fc686d46ed3d9291 (diff) | |
download | otp-7b57b86a78f668747cc28e1820a0e6e8474111ea.tar.gz otp-7b57b86a78f668747cc28e1820a0e6e8474111ea.tar.bz2 otp-7b57b86a78f668747cc28e1820a0e6e8474111ea.zip |
Merge branch 'bjorn/stdlib/fix-erl_lint-bugs/OTP-13157' into maint
* bjorn/stdlib/fix-erl_lint-bugs/OTP-13157:
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.erl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl index c4cb5fdc80..5678e7eebe 100644 --- a/lib/stdlib/src/erl_lint.erl +++ b/lib/stdlib/src/erl_lint.erl @@ -293,6 +293,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) -> |