aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2010-05-30 08:27:57 +0200
committerBjörn Gustavsson <[email protected]>2011-11-02 12:12:30 +0100
commitb9e610cf12419c6ffe2c19df4f70009bd98ae50c (patch)
tree21f7c7d2e0b5296e4553d0c372c4834795e63c05 /lib
parent71f2687e53ef52ae94ab3569a601456d1e906a59 (diff)
downloadotp-b9e610cf12419c6ffe2c19df4f70009bd98ae50c.tar.gz
otp-b9e610cf12419c6ffe2c19df4f70009bd98ae50c.tar.bz2
otp-b9e610cf12419c6ffe2c19df4f70009bd98ae50c.zip
Test calling a parameterized module within a fun
It is tempting to transform code such as: fun(X) -> M:foo(X) end to: fun M:foo/1 Unfortunately, that transformation is not safe if M happens to be a parameterized module. Add a test case so that we don't attempt to do such an optimization in the future.
Diffstat (limited to 'lib')
-rw-r--r--lib/compiler/test/pmod_SUITE.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/compiler/test/pmod_SUITE.erl b/lib/compiler/test/pmod_SUITE.erl
index 9a317b5762..3d02adaf52 100644
--- a/lib/compiler/test/pmod_SUITE.erl
+++ b/lib/compiler/test/pmod_SUITE.erl
@@ -96,6 +96,10 @@ basic_1(Config, Opts) ->
?line error = Prop4:bar_bar({s,a,b}),
?line error = Prop4:bar_bar([]),
+ %% Call from a fun.
+ Fun = fun(Arg) -> Prop4:bar(Arg) end,
+ ?line ok = Fun({s,0}),
+
ok.
otp_8447(Config) when is_list(Config) ->