QuickDoc: Show sample code containing type parameters correctly
#KT-20777 Fixed
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* @sample samples.nestedTypeParameter
|
||||
*/
|
||||
fun some<caret>() {
|
||||
|
||||
}
|
||||
|
||||
//INFO: <div class='definition'><pre><font color="808080"><i>usageNestedTypeParameters.kt</i></font><br>public fun <b>some</b>(): Unit</pre></div><div class='content'></div><table class='sections'><tr><td valign='top' class='section'><p>Samples:</td><td valign='top'><p><a href="psi_element://samples.nestedTypeParameter"><code>samples.nestedTypeParameter</code></a><pre><code>
|
||||
//INFO: val m = mapOf<String, Pair<Int, Long>>()
|
||||
//INFO: println(m)
|
||||
//INFO: </code></pre></td></table>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* @sample samples.singleTypeParameter
|
||||
*/
|
||||
fun some<caret>() {
|
||||
|
||||
}
|
||||
|
||||
//INFO: <div class='definition'><pre><font color="808080"><i>usageSingleTypeParameter.kt</i></font><br>public fun <b>some</b>(): Unit</pre></div><div class='content'></div><table class='sections'><tr><td valign='top' class='section'><p>Samples:</td><td valign='top'><p><a href="psi_element://samples.singleTypeParameter"><code>samples.singleTypeParameter</code></a><pre><code>
|
||||
//INFO: val l = listOf<String>()
|
||||
//INFO: println(l)
|
||||
//INFO: </code></pre></td></table>
|
||||
@@ -0,0 +1,6 @@
|
||||
package samples
|
||||
|
||||
fun nestedTypeParameter() {
|
||||
val m = mapOf<String, Pair<Int, Long>>()
|
||||
println(m)
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
package samples
|
||||
|
||||
fun singleTypeParameter() {
|
||||
val l = listOf<String>()
|
||||
println(l)
|
||||
}
|
||||
Reference in New Issue
Block a user