aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/code_SUITE_data/fun_confusion.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2011-11-07 14:01:20 +0100
committerBjörn Gustavsson <[email protected]>2011-11-07 14:01:20 +0100
commit2a8c0f1eecafc88c5e474b54210f4f85b48b1ce2 (patch)
tree2201d1c2d46888135835c197c3376bb40bd2cd59 /erts/emulator/test/code_SUITE_data/fun_confusion.erl
parentd0f1b81f1f0a8955c09d8a626d2d747950c52459 (diff)
parentb2cd72d36c5dbd559659213ca6d0d1fab3df8aa1 (diff)
downloadotp-2a8c0f1eecafc88c5e474b54210f4f85b48b1ce2.tar.gz
otp-2a8c0f1eecafc88c5e474b54210f4f85b48b1ce2.tar.bz2
otp-2a8c0f1eecafc88c5e474b54210f4f85b48b1ce2.zip
Merge branch 'bjorn/fun-improvements/OTP-9667'
* bjorn/fun-improvements/OTP-9667: sys_pre_expand: Remove incorrect comment compiler: Eliminate use of deprecated erlang:hash/2 beam_asm: Fix broken NewIndex in fun entries beam_asm: Strenghten the calculation of Uniq for funs
Diffstat (limited to 'erts/emulator/test/code_SUITE_data/fun_confusion.erl')
-rw-r--r--erts/emulator/test/code_SUITE_data/fun_confusion.erl31
1 files changed, 31 insertions, 0 deletions
diff --git a/erts/emulator/test/code_SUITE_data/fun_confusion.erl b/erts/emulator/test/code_SUITE_data/fun_confusion.erl
new file mode 100644
index 0000000000..16000861df
--- /dev/null
+++ b/erts/emulator/test/code_SUITE_data/fun_confusion.erl
@@ -0,0 +1,31 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+-module(fun_confusion).
+
+-export([f/0]).
+
+f() ->
+ fun() -> version() end.
+
+version() ->
+ %% Changing the value returned here should change
+ %% the identity of the fun in f/0.
+ ?version.
+