removing static type assertions work in progress

This commit is contained in:
Dmitry Jemerov
2015-10-07 12:19:37 +02:00
parent 8f87efc0a2
commit 1523d5bcbf
149 changed files with 514 additions and 867 deletions
@@ -28,9 +28,6 @@ fun test() {
a as?
String
a :
String
a in
1..2
@@ -28,9 +28,6 @@ fun test() {
a as?
String
a :
String
a in
1..2
@@ -28,9 +28,6 @@ fun test() {
a as?
String
a :
String
a in
1..2
@@ -1,5 +1,5 @@
fun main(args: Array<String>) {
asse<caret>rt(false, "mess": kotlin.String)
asse<caret>rt(false, "mess" as kotlin.String)
}
// WITH_RUNTIME
@@ -1,6 +1,6 @@
fun main(args: Array<String>) {
if (!false) {
throw AssertionError("mess": kotlin.String)
throw AssertionError("mess" as kotlin.String)
}
}
@@ -1,6 +1,6 @@
// IS_APPLICABLE: true
fun foo() {
<caret>bar({ 2 * it }: (Int) -> Int)
<caret>bar({ 2 * it } as (Int) -> Int)
}
fun bar<T>(t: T): Int = 1
@@ -1,6 +1,6 @@
// IS_APPLICABLE: true
fun foo() {
bar<(Int) -> Int>({ 2 * it }: (Int) -> Int)
bar<(Int) -> Int>({ 2 * it } as (Int) -> Int)
}
fun bar<T>(t: T): Int = 1
@@ -1,4 +0,0 @@
// "Remove static type assertion" "true"
fun foo(a: String) {
val b = a <caret>: Any
}
@@ -1,4 +0,0 @@
// "Remove static type assertion" "true"
fun foo(a: String) {
val b = a
}
+1 -1
View File
@@ -1,7 +1,7 @@
// "Suppress 'REDUNDANT_NULLABLE' for statement " "true"
fun foo() {
call("": String?<caret>?)
call("" as String?<caret>?)
}
fun call(s: String?) {}
-5
View File
@@ -1,5 +0,0 @@
// "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true"
fun foo() {
""<caret>!! : String
}
@@ -1,6 +0,0 @@
// "Suppress 'UNNECESSARY_NOT_NULL_ASSERTION' for statement " "true"
fun foo() {
@Suppress("UNNECESSARY_NOT_NULL_ASSERTION")
(""<caret>!! : String)
}
@@ -2,7 +2,7 @@
fun foo() {
var v = Box<String?>()
(v: Box<String?<caret>?>)++
(v as Box<String?<caret>?>)++
}
class Box<T> {
@@ -2,7 +2,7 @@
fun foo() {
var v = Box<String?>()
++(v: Box<String?<caret>?>)
++(v as Box<String?<caret>?>)
}
class Box<T> {