don't report USELESS_CAST in case of casting to superype using 'as'

This commit is contained in:
Dmitry Jemerov
2015-04-24 16:18:54 +02:00
parent f374eec8f1
commit 8258d72e23
4 changed files with 37 additions and 8 deletions
@@ -15,6 +15,6 @@ fun bar() {
val x = X
x.foo()
X.foo()
(X <!USELESS_CAST!>as C<!>).foo()
(X as C).foo()
((if (1<2) X else Y) <!USELESS_CAST!>as C<!>).foo()
}