Report warning on unary plus()/minus()
This commit is contained in:
Vendored
+1
-1
@@ -24,7 +24,7 @@ import java.util.*
|
||||
}
|
||||
|
||||
abstract class TagWithText(name : String) : Tag(name) {
|
||||
operator fun String.plus() {
|
||||
operator fun String.unaryPlus() {
|
||||
children.add(TextElement(this))
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ class MyClass {
|
||||
@Deprecated("Use A instead") operator fun MyClass.times(i: MyClass) { i.i }
|
||||
|
||||
@Deprecated("Use A instead") operator fun MyClass.not() { }
|
||||
@Deprecated("Use A instead") operator fun MyClass.plus() { }
|
||||
@Deprecated("Use A instead") operator fun MyClass.unaryPlus() { }
|
||||
|
||||
@Deprecated("Use A instead") operator fun MyClass.contains(i: MyClass): Boolean { i.i; return false }
|
||||
|
||||
@@ -24,7 +24,7 @@ fun test() {
|
||||
x1 <warning descr="[DEPRECATION] 'times(MyClass): Unit' is deprecated. Use A instead">*</warning> x2
|
||||
|
||||
<warning descr="[DEPRECATION] 'not(): Unit' is deprecated. Use A instead">!</warning>x1
|
||||
<warning descr="[DEPRECATION] 'plus(): Unit' is deprecated. Use A instead">+</warning>x1
|
||||
<warning descr="[DEPRECATION] 'unaryPlus(): Unit' is deprecated. Use A instead">+</warning>x1
|
||||
|
||||
x1 <warning descr="[DEPRECATION] 'contains(MyClass): Boolean' is deprecated. Use A instead">in</warning> x2
|
||||
x1 <warning descr="[DEPRECATION] 'contains(MyClass): Boolean' is deprecated. Use A instead">!in</warning> x2
|
||||
|
||||
Reference in New Issue
Block a user