diff options
author | Kostis Sagonas <[email protected]> | 2013-10-09 17:03:38 +0200 |
---|---|---|
committer | Kostis Sagonas <[email protected]> | 2013-10-09 17:03:38 +0200 |
commit | a64ee8724ba7c5d9b0e0560591765cbfd6fabe97 (patch) | |
tree | 8271d721dd7d13e68831b3a85f970dafc6e72023 /lib/dialyzer/test/small_SUITE_data/src | |
parent | e0ecc86e35475b434efa6cccba44074ca1040b7a (diff) | |
download | otp-a64ee8724ba7c5d9b0e0560591765cbfd6fabe97.tar.gz otp-a64ee8724ba7c5d9b0e0560591765cbfd6fabe97.tar.bz2 otp-a64ee8724ba7c5d9b0e0560591765cbfd6fabe97.zip |
Add some more comments about what the test does
This changed the lines so the results now differ.
Diffstat (limited to 'lib/dialyzer/test/small_SUITE_data/src')
-rw-r--r-- | lib/dialyzer/test/small_SUITE_data/src/trec.erl | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/dialyzer/test/small_SUITE_data/src/trec.erl b/lib/dialyzer/test/small_SUITE_data/src/trec.erl index ba50c3b401..06706162c1 100644 --- a/lib/dialyzer/test/small_SUITE_data/src/trec.erl +++ b/lib/dialyzer/test/small_SUITE_data/src/trec.erl @@ -18,20 +18,22 @@ %% ('undefined',atom()) %% 3. Function mk_foo_loc/2 has no local return %% -%% Arguably, the second warning is not what most users have in mind -%% when they wrote the type declarations in the 'foo' record, so no -%% doubt they'll find it confusing. But note that it is also inconsistent! -%% How come there is a success typing for a function that has no local return? +%% Arguably, the second warning is not what most users have in mind when +%% they wrote the type declarations in the 'foo' record, so no doubt +%% they'll find it confusing. But note that it is also quite confusing! +%% Many users may be wondering: How come there is a success typing for a +%% function that has no local return? Running typer on this module +%% reveals a success typing for this function that is interesting indeed. %% test() -> - mk_foo_loc(42, bar:f()). + mk_foo_loc(42, some_mod:some_function()). mk_foo_loc(A, B) -> #foo{a = A, b = [A,B]}. %% -%% For this function we currently get "has no local return" but we get -%% no reason; I want us to get a reason. +%% For this function we used to get a "has no local return" warning +%% but we got no reason. This has now been fixed. %% mk_foo_exp(A, B) when is_integer(A) -> #foo{a = A, b = [A,B]}. |