Report warning on unary plus()/minus()

This commit is contained in:
Yan Zhulanow
2015-10-12 18:37:28 +03:00
parent 58cbf09232
commit b2470a6aad
16 changed files with 75 additions and 36 deletions
@@ -1,12 +1,12 @@
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE -NOTHING_TO_INLINE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -VAL_REASSIGNMENT -UNUSED_CHANGED_VALUE -VARIABLE_EXPECTED
inline operator fun <T, V> Function1<T, V>.plus() = <!USAGE_IS_NOT_INLINABLE!>this<!>
operator fun <T, V> Function1<T, V>.minus() = this
inline operator fun <T, V> Function1<T, V>.unaryPlus() = <!USAGE_IS_NOT_INLINABLE!>this<!>
operator fun <T, V> Function1<T, V>.unaryMinus() = this
inline operator fun <T, V> Function1<T, V>.inc() = <!USAGE_IS_NOT_INLINABLE!>this<!>
operator fun <T, V> Function1<T, V>.dec() = this
inline operator fun <T, V> @Extension Function2<T, T, V>.plus(){}
operator fun <T, V> @Extension Function2<T, T, V>.minus(){}
inline operator fun <T, V> @Extension Function2<T, T, V>.unaryPlus(){}
operator fun <T, V> @Extension Function2<T, T, V>.unaryMinus(){}
inline operator fun <T, V> @Extension Function2<T, T, V>.inc() = <!USAGE_IS_NOT_INLINABLE!>this<!>
operator fun <T, V> @Extension Function2<T, T, V>.dec() = this
@@ -6,7 +6,7 @@ public operator fun </*0*/ T, /*1*/ V> (T.(T) -> V).dec(): T.(T) -> V
@kotlin.inline() public operator fun </*0*/ T, /*1*/ V> ((T) -> V).inc(): (T) -> V
@kotlin.inline() public operator fun </*0*/ T, /*1*/ V> (T.(T) -> V).inc(): T.(T) -> V
@kotlin.inline() public fun </*0*/ T, /*1*/ V> ((T) -> V).inlineFunWithInvoke(): kotlin.Unit
public operator fun </*0*/ T, /*1*/ V> ((T) -> V).minus(): (T) -> V
public operator fun </*0*/ T, /*1*/ V> (T.(T) -> V).minus(): kotlin.Unit
@kotlin.inline() public operator fun </*0*/ T, /*1*/ V> ((T) -> V).plus(): (T) -> V
@kotlin.inline() public operator fun </*0*/ T, /*1*/ V> (T.(T) -> V).plus(): kotlin.Unit
public operator fun </*0*/ T, /*1*/ V> ((T) -> V).unaryMinus(): (T) -> V
public operator fun </*0*/ T, /*1*/ V> (T.(T) -> V).unaryMinus(): kotlin.Unit
@kotlin.inline() public operator fun </*0*/ T, /*1*/ V> ((T) -> V).unaryPlus(): (T) -> V
@kotlin.inline() public operator fun </*0*/ T, /*1*/ V> (T.(T) -> V).unaryPlus(): kotlin.Unit