Deprecate meaningless or vague-defined operations with Char operands.

Change expected test output.
This commit is contained in:
Ilya Gorbunov
2015-05-26 19:04:07 +03:00
parent c6abf75856
commit 84ca26719d
9 changed files with 256 additions and 170 deletions
@@ -7,12 +7,12 @@ class A(val a:Int) {
val y = checkSubtype<A>(this@A)
val z = checkSubtype<B>(this)
val Int.xx : Int get() = checkSubtype<Int>(this)
fun Char.xx() : Double.() -> Unit {
checkSubtype<Char>(this)
val <warning>a</warning>: Double.() -> Unit = { checkSubtype<Double>(this) + checkSubtype<Char>(this@xx) }
val <warning>b</warning>: Double.() -> Unit = a@{checkSubtype<Double>(this@a) + checkSubtype<Char>(this@xx) }
val <warning>c</warning> = a@{<error>this@a</error> <error>+</error> checkSubtype<Char>(this@xx) }
return (a@{checkSubtype<Double>(this@a) + checkSubtype<Char>(this@xx) })
fun Byte.xx() : Double.() -> Unit {
checkSubtype<Byte>(this)
val <warning>a</warning>: Double.() -> Unit = { checkSubtype<Double>(this) + checkSubtype<Byte>(this@xx) }
val <warning>b</warning>: Double.() -> Unit = a@{checkSubtype<Double>(this@a) + checkSubtype<Byte>(this@xx) }
val <warning>c</warning> = a@{<error>this@a</error> <error>+</error> checkSubtype<Byte>(this@xx) }
return (a@{checkSubtype<Double>(this@a) + checkSubtype<Byte>(this@xx) })
}
}
}