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