aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/erl_expand_records_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-01-26 10:29:29 +0100
committerBjörn Gustavsson <[email protected]>2012-01-26 10:29:29 +0100
commit616f60727e3f4d5b999a920397ed0c22c3d86194 (patch)
tree6284d0fe065ab1d4c866fcde78797bbdbd00a53b /lib/stdlib/test/erl_expand_records_SUITE.erl
parent1695be3437010b4e18c51dc184e058a29c3ed8de (diff)
parent09d19b4e5e5314d6fc4ee04bc09a673ac8e0bd27 (diff)
downloadotp-616f60727e3f4d5b999a920397ed0c22c3d86194.tar.gz
otp-616f60727e3f4d5b999a920397ed0c22c3d86194.tar.bz2
otp-616f60727e3f4d5b999a920397ed0c22c3d86194.zip
Merge branch 'bjorn/compiler/bif-call-bug/OTP-9866' into maint
* bjorn/compiler/bif-call-bug/OTP-9866: erl_lint: Disallow call to is_record/3 if there is a local is_record/3 Ensure that generated record operations don't call local functions
Diffstat (limited to 'lib/stdlib/test/erl_expand_records_SUITE.erl')
-rw-r--r--lib/stdlib/test/erl_expand_records_SUITE.erl12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/stdlib/test/erl_expand_records_SUITE.erl b/lib/stdlib/test/erl_expand_records_SUITE.erl
index f8c1ad783c..8b162cfda0 100644
--- a/lib/stdlib/test/erl_expand_records_SUITE.erl
+++ b/lib/stdlib/test/erl_expand_records_SUITE.erl
@@ -178,6 +178,9 @@ expr(Config) when is_list(Config) ->
true ->
not_ok
end.
+
+ is_record(_, _, _) ->
+ error(wrong_is_record).
">>
],
@@ -366,6 +369,8 @@ strict(Config) when is_list(Config) ->
end
catch error:_ -> ok
end.
+ element(_, _) ->
+ error(wrong_element).
">>
],
?line run(Config, Ts1, [strict_record_tests]),
@@ -380,6 +385,8 @@ strict(Config) when is_list(Config) ->
case foo of
_ when A#r2.a =:= 1 -> ok
end.
+ element(_, _) ->
+ error(wrong_element).
">>
],
?line run(Config, Ts2, [no_strict_record_tests]),
@@ -415,6 +422,11 @@ update(Config) when is_list(Config) ->
t2() ->
R0 = #r{},
#r{_ = R0#r{a = ok}}.
+
+ %% Implicit calls to setelement/3 must go to the BIF,
+ %% not to this function.
+ setelement(_, _, _) ->
+ erlang:error(wrong_setelement_called).
">>
],
?line run(Config, Ts),