From 378be37160fde0041cf88f3dfa53e9db3ec3e219 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Tue, 6 Dec 2016 16:25:30 +0300 Subject: KT-14818 Render function type argument names in generated documentation (#116) Fix for KT-14818 Render function type argument names in generated documentation * Fixup, unescape name, before passing to identifier * Fixup --- .../format/functionalTypeWithNamedParameters.html | 25 ++++++++++++++++++++++ .../format/functionalTypeWithNamedParameters.kt | 9 ++++++++ .../format/functionalTypeWithNamedParameters.md | 21 ++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 core/testdata/format/functionalTypeWithNamedParameters.html create mode 100644 core/testdata/format/functionalTypeWithNamedParameters.kt create mode 100644 core/testdata/format/functionalTypeWithNamedParameters.md (limited to 'core/testdata/format') diff --git a/core/testdata/format/functionalTypeWithNamedParameters.html b/core/testdata/format/functionalTypeWithNamedParameters.html new file mode 100644 index 00000000..84a489ff --- /dev/null +++ b/core/testdata/format/functionalTypeWithNamedParameters.html @@ -0,0 +1,25 @@ + + + + + +test / A
+
+

A

+class Atest / B
+
+

B

+class Btest / C
+
+

C

+class Ctest / f
+
+

f

+ +val f: (a: A, b: B) -> Ctest / acceptFunctionTypeWithNamedArguments
+
+

acceptFunctionTypeWithNamedArguments

+ +fun acceptFunctionTypeWithNamedArguments(f: (bb: B, aa: A) -> C): Unit + + diff --git a/core/testdata/format/functionalTypeWithNamedParameters.kt b/core/testdata/format/functionalTypeWithNamedParameters.kt new file mode 100644 index 00000000..3dada27a --- /dev/null +++ b/core/testdata/format/functionalTypeWithNamedParameters.kt @@ -0,0 +1,9 @@ +class A +class B +class C + +val f: (a: A, b: B) -> C = { a, b -> C() } + +fun acceptFunctionTypeWithNamedArguments(f: (bb: B, aa: A) -> C) { + +} \ No newline at end of file diff --git a/core/testdata/format/functionalTypeWithNamedParameters.md b/core/testdata/format/functionalTypeWithNamedParameters.md new file mode 100644 index 00000000..317fa6af --- /dev/null +++ b/core/testdata/format/functionalTypeWithNamedParameters.md @@ -0,0 +1,21 @@ +[test](test/index) / [A](test/-a/index) + +# A + +`class A`[test](test/index) / [B](test/-b/index) + +# B + +`class B`[test](test/index) / [C](test/-c/index) + +# C + +`class C`[test](test/index) / [f](test/f) + +# f + +`val f: (a: `[`A`](test/-a/index)`, b: `[`B`](test/-b/index)`) -> `[`C`](test/-c/index)[test](test/index) / [acceptFunctionTypeWithNamedArguments](test/accept-function-type-with-named-arguments) + +# acceptFunctionTypeWithNamedArguments + +`fun acceptFunctionTypeWithNamedArguments(f: (bb: `[`B`](test/-b/index)`, aa: `[`A`](test/-a/index)`) -> `[`C`](test/-c/index)`): Unit` \ No newline at end of file -- cgit