diff options
author | Hans Bolinder <[email protected]> | 2014-11-25 09:06:13 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2014-11-25 09:06:13 +0100 |
commit | b0a48f37a5c04d158369cc69d5a8afafd67663cd (patch) | |
tree | 391bb3c30bc396a927f56418f9fd9a5dfe3272c1 /lib/dialyzer/test | |
parent | b36de499775d6dfcdb61ce1df079911a4ed3f2d5 (diff) | |
parent | 872fa86ddebbc84b07dc5426d25f7fb300731f52 (diff) | |
download | otp-b0a48f37a5c04d158369cc69d5a8afafd67663cd.tar.gz otp-b0a48f37a5c04d158369cc69d5a8afafd67663cd.tar.bz2 otp-b0a48f37a5c04d158369cc69d5a8afafd67663cd.zip |
Merge branch 'maint'
* maint:
dialyzer: correct record updates
Diffstat (limited to 'lib/dialyzer/test')
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/results/record_update | 2 | ||||
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/src/record_update.erl | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/results/record_update b/lib/dialyzer/test/small_SUITE_data/results/record_update new file mode 100644 index 0000000000..ea52057adf --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/results/record_update @@ -0,0 +1,2 @@ + +record_update.erl:7: Invalid type specification for function record_update:quux/2. The success typing is (#foo{bar::atom()},atom()) -> #foo{bar::atom()} diff --git a/lib/dialyzer/test/small_SUITE_data/src/record_update.erl b/lib/dialyzer/test/small_SUITE_data/src/record_update.erl new file mode 100644 index 0000000000..bad7a0a929 --- /dev/null +++ b/lib/dialyzer/test/small_SUITE_data/src/record_update.erl @@ -0,0 +1,10 @@ +-module(record_update). + +-export([quux/2]). + +-record(foo, {bar :: atom()}). + +-spec quux(#foo{}, string()) -> #foo{}. + +quux(Foo, NotBar) -> + Foo#foo{ bar = NotBar }. |