diff options
author | Simon Ogorodnik <sem-oro@yandex.ru> | 2016-12-06 16:25:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-06 16:25:30 +0300 |
commit | 378be37160fde0041cf88f3dfa53e9db3ec3e219 (patch) | |
tree | 42c3a46f9d460b9fd75dea3d6560bcebeb4a78fc /core/testdata/format | |
parent | 2d03ad01f650bc997dce076abaab0a61c2301a96 (diff) | |
download | dokka-378be37160fde0041cf88f3dfa53e9db3ec3e219.tar.gz dokka-378be37160fde0041cf88f3dfa53e9db3ec3e219.tar.bz2 dokka-378be37160fde0041cf88f3dfa53e9db3ec3e219.zip |
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
Diffstat (limited to 'core/testdata/format')
3 files changed, 55 insertions, 0 deletions
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 @@ +<HTML> +<HEAD> +<meta charset="UTF-8"> +</HEAD> +<BODY> +<a href="test/index">test</a> / <a href="test/-a/index">A</a><br/> +<br/> +<h1>A</h1> +<code><span class="keyword">class </span><span class="identifier">A</span></code><a href="test/index">test</a> / <a href="test/-b/index">B</a><br/> +<br/> +<h1>B</h1> +<code><span class="keyword">class </span><span class="identifier">B</span></code><a href="test/index">test</a> / <a href="test/-c/index">C</a><br/> +<br/> +<h1>C</h1> +<code><span class="keyword">class </span><span class="identifier">C</span></code><a href="test/index">test</a> / <a href="test/f">f</a><br/> +<br/> +<h1>f</h1> +<a name="$f"></a> +<code><span class="keyword">val </span><span class="identifier">f</span><span class="symbol">: </span><span class="symbol">(</span><span class="identifier">a</span><span class="symbol">:</span> <a href="test/-a/index"><span class="identifier">A</span></a><span class="symbol">,</span> <span class="identifier">b</span><span class="symbol">:</span> <a href="test/-b/index"><span class="identifier">B</span></a><span class="symbol">)</span> <span class="symbol">-></span> <a href="test/-c/index"><span class="identifier">C</span></a></code><a href="test/index">test</a> / <a href="test/accept-function-type-with-named-arguments">acceptFunctionTypeWithNamedArguments</a><br/> +<br/> +<h1>acceptFunctionTypeWithNamedArguments</h1> +<a name="$acceptFunctionTypeWithNamedArguments(kotlin.Function2((B, A, C)))"></a> +<code><span class="keyword">fun </span><span class="identifier">acceptFunctionTypeWithNamedArguments</span><span class="symbol">(</span><span class="identifier" id="$acceptFunctionTypeWithNamedArguments(kotlin.Function2((B, A, C)))/f">f</span><span class="symbol">:</span> <span class="symbol">(</span><span class="identifier">bb</span><span class="symbol">:</span> <a href="test/-b/index"><span class="identifier">B</span></a><span class="symbol">,</span> <span class="identifier">aa</span><span class="symbol">:</span> <a href="test/-a/index"><span class="identifier">A</span></a><span class="symbol">)</span> <span class="symbol">-></span> <a href="test/-c/index"><span class="identifier">C</span></a><span class="symbol">)</span><span class="symbol">: </span><span class="identifier">Unit</span></code> +</BODY> +</HTML> 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 |