aboutsummaryrefslogtreecommitdiffstats
path: root/lib/syntax_tools/test/syntax_tools_SUITE_data
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2019-01-15 11:24:57 +0100
committerHans Bolinder <[email protected]>2019-01-15 11:24:57 +0100
commit80b0574260924c4ef888fe319274f9303982d45b (patch)
treeeef88aa2429160b3d583b755e482d77b0935e46d /lib/syntax_tools/test/syntax_tools_SUITE_data
parentc27e37d5c37b1edb81f9521b96bdd996ca25653b (diff)
downloadotp-80b0574260924c4ef888fe319274f9303982d45b.tar.gz
otp-80b0574260924c4ef888fe319274f9303982d45b.tar.bz2
otp-80b0574260924c4ef888fe319274f9303982d45b.zip
syntax_tools: Fix pretty-printing of type funs
See also ERL-815.
Diffstat (limited to 'lib/syntax_tools/test/syntax_tools_SUITE_data')
-rw-r--r--lib/syntax_tools/test/syntax_tools_SUITE_data/specs_and_funs.erl18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/syntax_tools/test/syntax_tools_SUITE_data/specs_and_funs.erl b/lib/syntax_tools/test/syntax_tools_SUITE_data/specs_and_funs.erl
new file mode 100644
index 0000000000..8dfeaf5a6b
--- /dev/null
+++ b/lib/syntax_tools/test/syntax_tools_SUITE_data/specs_and_funs.erl
@@ -0,0 +1,18 @@
+-module(specs_and_funs).
+
+-export([my_apply/3, two/1]).
+
+%% OTP-15519, ERL-815
+
+-spec my_apply(Fun, Arg, fun((A) -> A)) -> Result when
+ Fun :: fun((Arg) -> Result),
+ Arg :: any(),
+ Result :: any().
+
+my_apply(Fun, Arg, _) ->
+ Fun(Arg).
+
+-spec two(fun((A) -> A)) -> fun((B) -> B).
+
+two(F) ->
+ F(fun(X) -> X end).