From 9242a3d3dc60060e521d47edcd4dc00bb07b4b8c Mon Sep 17 00:00:00 2001 From: Ilya Ryzhenkov Date: Mon, 1 Dec 2014 22:06:18 +0300 Subject: [PATCH] Use standard emptyList() --- idea/testData/completion/smart/GroupBySubstitutor.kt | 2 -- libraries/stdlib/src/kotlin/dom/Dom.kt | 11 ++++------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/idea/testData/completion/smart/GroupBySubstitutor.kt b/idea/testData/completion/smart/GroupBySubstitutor.kt index 5a01195369f..1d47887b1b8 100644 --- a/idea/testData/completion/smart/GroupBySubstitutor.kt +++ b/idea/testData/completion/smart/GroupBySubstitutor.kt @@ -1,5 +1,3 @@ -fun emptyList(): List = listOf() - fun foo(list: List){} fun foo(list: List, i: Int){} fun foo(list: List, b: Boolean){} diff --git a/libraries/stdlib/src/kotlin/dom/Dom.kt b/libraries/stdlib/src/kotlin/dom/Dom.kt index 5e4cc83e3c7..7410bb7b336 100644 --- a/libraries/stdlib/src/kotlin/dom/Dom.kt +++ b/libraries/stdlib/src/kotlin/dom/Dom.kt @@ -10,9 +10,6 @@ import java.lang.IndexOutOfBoundsException // Properties -private fun emptyElementList(): List = Collections.emptyList() -private fun emptyNodeList(): List = Collections.emptyList() - public var Node.text: String get() { return textContent @@ -122,7 +119,7 @@ public fun Document?.elements(namespaceUri: String, localName: String): List { return if (this == null) { // TODO the following is easier to convert to JS - emptyNodeList() + emptyList() } else { NodeListAsList(this) @@ -154,13 +151,13 @@ public fun Document?.get(selector: String): List { return if (element != null) arrayListOf(element) else - emptyElementList() + emptyList() } else { // assume its a vanilla element name elements(selector) } } else { - emptyElementList() + emptyList() } } @@ -175,7 +172,7 @@ public fun Element.get(selector: String): List { return if (element != null) arrayListOf(element) else - emptyElementList() + emptyList() } else { // assume its a vanilla element name elements(selector)