From f19aa2290cb2e179d917e3ae0cbd14d906520bc8 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Mon, 1 Dec 2014 12:00:26 +0300 Subject: [PATCH] Minor, remove unnecessary NOTHING_TO_INLINE suppressions --- compiler/util/src/org/jetbrains/jet/utils/addToStdlib.kt | 8 +------- .../src/org/jetbrains/jet/lang/resolve/scopes/JetScope.kt | 1 - 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/compiler/util/src/org/jetbrains/jet/utils/addToStdlib.kt b/compiler/util/src/org/jetbrains/jet/utils/addToStdlib.kt index 9ca54e306ba..cb68678a7e5 100644 --- a/compiler/util/src/org/jetbrains/jet/utils/addToStdlib.kt +++ b/compiler/util/src/org/jetbrains/jet/utils/addToStdlib.kt @@ -35,38 +35,32 @@ public fun T?.singletonOrEmptyList(): List = if (this != null) Colle public fun T?.singletonOrEmptySet(): Set = if (this != null) Collections.singleton(this) else Collections.emptySet() -[suppress("NOTHING_TO_INLINE")] public inline fun Stream<*>.firstIsInstanceOrNull(): T? { for (element in this) if (element is T) return element return null } -[suppress("NOTHING_TO_INLINE")] public inline fun Iterable<*>.firstIsInstanceOrNull(): T? { for (element in this) if (element is T) return element return null } -[suppress("NOTHING_TO_INLINE")] public inline fun Array<*>.firstIsInstanceOrNull(): T? { for (element in this) if (element is T) return element return null } -[suppress("NOTHING_TO_INLINE")] public inline fun Stream<*>.firstIsInstance(): T { for (element in this) if (element is T) return element throw NoSuchElementException("No element of given type found") } -[suppress("NOTHING_TO_INLINE")] public inline fun Iterable<*>.firstIsInstance(): T { for (element in this) if (element is T) return element throw NoSuchElementException("No element of given type found") } -[suppress("NOTHING_TO_INLINE")] public inline fun Array<*>.firstIsInstance(): T { for (element in this) if (element is T) return element throw NoSuchElementException("No element of given type found") -} \ No newline at end of file +} diff --git a/core/descriptors/src/org/jetbrains/jet/lang/resolve/scopes/JetScope.kt b/core/descriptors/src/org/jetbrains/jet/lang/resolve/scopes/JetScope.kt index 7eabc3d14cd..6c7ee7b2701 100644 --- a/core/descriptors/src/org/jetbrains/jet/lang/resolve/scopes/JetScope.kt +++ b/core/descriptors/src/org/jetbrains/jet/lang/resolve/scopes/JetScope.kt @@ -178,7 +178,6 @@ public class DescriptorKindFilter( .filterNotNull() .toReadOnlyList() - [suppress("NOTHING_TO_INLINE")] private inline fun staticFields() = javaClass().getFields().filter { Modifier.isStatic(it.getModifiers()) } } }