avoid unnecessary verbose type parameters now the type inferencer is better
This commit is contained in:
@@ -17,7 +17,7 @@ fun customerTemplate(customer: Customer) = """
|
||||
<body>
|
||||
<h1>Hello ${customer.name}</h1>
|
||||
<ul>
|
||||
${customer.products.map<Product,String>{ productSnippet(it) }.makeString("\n")}
|
||||
${customer.products.map{ productSnippet(it) }.makeString("\n")}
|
||||
</ul>
|
||||
<p>lets do some kool stuff</p>
|
||||
</body>
|
||||
|
||||
@@ -105,11 +105,8 @@ class OptionTest: TestCase() {
|
||||
*/
|
||||
|
||||
val name = request.getParameter("name")
|
||||
val upper = name.map<String, String>{ it.trim() }.filter{ it.length != 0 }.map<String, String>{ it.toUpperCase() }
|
||||
val upper = name.map{ it.trim() }.filter{ it.length != 0 }.map{ it.toUpperCase() }
|
||||
return upper ?: ""
|
||||
|
||||
// TODO when http://youtrack.jetbrains.com/issue/KT-1145 is fixed
|
||||
// we can get rid of the unnecessary <String, String> on map
|
||||
}
|
||||
|
||||
assertEquals("", foo(Request(null)))
|
||||
|
||||
Reference in New Issue
Block a user