diff --git a/compiler/testData/codegen/controlStructures/ifInWhile.jet b/compiler/testData/codegen/controlStructures/ifInWhile.jet index 834c71f2b6f..f0dd043b966 100644 --- a/compiler/testData/codegen/controlStructures/ifInWhile.jet +++ b/compiler/testData/codegen/controlStructures/ifInWhile.jet @@ -1,7 +1,7 @@ import java.lang.Runtime fun box() : String { - val processors = Runtime.getRuntime().sure().availableProcessors() + val processors = Runtime.getRuntime()!!.availableProcessors() var threadNum = 1 while(threadNum <= 1024) { System.out?.println(threadNum) diff --git a/compiler/testData/codegen/regressions/kt1018.kt b/compiler/testData/codegen/regressions/kt1018.kt index 5fac168ecf4..68f6c20e5c6 100644 --- a/compiler/testData/codegen/regressions/kt1018.kt +++ b/compiler/testData/codegen/regressions/kt1018.kt @@ -1,7 +1,7 @@ public class StockMarketTableModel() { public fun getColumnCount() : Int { - return COLUMN_TITLES?.size.sure() + return COLUMN_TITLES?.size!! } class object { diff --git a/compiler/testData/codegen/regressions/kt1199.kt b/compiler/testData/codegen/regressions/kt1199.kt index 9939ff6a890..5ea600ddd75 100644 --- a/compiler/testData/codegen/regressions/kt1199.kt +++ b/compiler/testData/codegen/regressions/kt1199.kt @@ -6,7 +6,7 @@ fun T?.iterator() = object { fun next() : T { if (hasNext) { hasNext = false - return this@iterator.sure() + return this@iterator!! } throw java.util.NoSuchElementException() } diff --git a/compiler/testData/codegen/regressions/kt1406.kt b/compiler/testData/codegen/regressions/kt1406.kt index d053b779247..5893c0043ae 100644 --- a/compiler/testData/codegen/regressions/kt1406.kt +++ b/compiler/testData/codegen/regressions/kt1406.kt @@ -7,11 +7,11 @@ import kotlin.util.* class C{ public fun foo(){ - val items : Collection = java.util.Collections.singleton(Item()).sure() + val items : Collection = java.util.Collections.singleton(Item())!! val result = ArrayList() val pattern: Pattern? = Pattern.compile("...") items.filterTo(result) { - pattern.sure().matcher(it.name()).sure().matches() + pattern!!.matcher(it.name())!!.matches() } } diff --git a/compiler/testData/codegen/regressions/kt1482_2279.kt b/compiler/testData/codegen/regressions/kt1482_2279.kt index bed64b91282..df07629e40c 100644 --- a/compiler/testData/codegen/regressions/kt1482_2279.kt +++ b/compiler/testData/codegen/regressions/kt1482_2279.kt @@ -8,12 +8,12 @@ abstract class ClassValAbstract { fun box() : String { for(m in ClassValAbstract.methods) { - if (m.sure().getName() == "getA") { - if(m.sure().getModifiers() != 1025) + if (m!!.getName() == "getA") { + if(m!!.getModifiers() != 1025) return "get failed" } - if (m.sure().getName() == "setA") { - if(m.sure().getModifiers() != 1025) + if (m!!.getName() == "setA") { + if(m!!.getModifiers() != 1025) return "set failed" } } diff --git a/compiler/testData/codegen/regressions/kt1515.kt b/compiler/testData/codegen/regressions/kt1515.kt index cc93cfa3c8d..0cc0dcba2ed 100644 --- a/compiler/testData/codegen/regressions/kt1515.kt +++ b/compiler/testData/codegen/regressions/kt1515.kt @@ -1,4 +1,4 @@ fun box(): String { val c = javaClass() - return if(c.getName().sure() == "java.lang.Runnable") "OK" else "fail" + return if(c.getName()!! == "java.lang.Runnable") "OK" else "fail" } \ No newline at end of file diff --git a/compiler/testData/codegen/regressions/kt529.kt b/compiler/testData/codegen/regressions/kt529.kt index 08257e1db14..f57e0f2d8e9 100644 --- a/compiler/testData/codegen/regressions/kt529.kt +++ b/compiler/testData/codegen/regressions/kt529.kt @@ -61,7 +61,7 @@ class Luhny() { private fun printOneDigit() { while (!buffer.isEmpty()) { - val c = buffer.removeFirst().sure() + val c = buffer.removeFirst()!! print(c) if (c.isDigit()) { digits.removeFirst() diff --git a/compiler/testData/codegen/regressions/kt725.kt b/compiler/testData/codegen/regressions/kt725.kt index 950b4c6b734..7ab562ae773 100644 --- a/compiler/testData/codegen/regressions/kt725.kt +++ b/compiler/testData/codegen/regressions/kt725.kt @@ -1,4 +1,4 @@ -fun Int?.inc() = this.sure().inc() +fun Int?.inc() = this!!.inc() public fun box() : String { var i : Int? = 10 diff --git a/compiler/testData/codegen/regressions/kt752.jet b/compiler/testData/codegen/regressions/kt752.jet index 2f6ab3d7d69..f473d6bae24 100644 --- a/compiler/testData/codegen/regressions/kt752.jet +++ b/compiler/testData/codegen/regressions/kt752.jet @@ -1,6 +1,6 @@ package demo_range -fun Int?.rangeTo(other : Int?) : IntRange = this.sure().rangeTo(other.sure()) +fun Int?.rangeTo(other : Int?) : IntRange = this!!.rangeTo(other!!) fun box() : String { val x : Int? = 10 diff --git a/compiler/testData/codegen/regressions/kt753.jet b/compiler/testData/codegen/regressions/kt753.jet index 75a54b5ca33..483bc636cd6 100644 --- a/compiler/testData/codegen/regressions/kt753.jet +++ b/compiler/testData/codegen/regressions/kt753.jet @@ -1,6 +1,6 @@ package bitwise_demo -fun Long?.shl(bits : Int?) : Long = this.sure().shl(bits.sure()) +fun Long?.shl(bits : Int?) : Long = this!!.shl(bits!!) fun box() : String { val x : Long? = 10 diff --git a/compiler/testData/codegen/regressions/kt756.jet b/compiler/testData/codegen/regressions/kt756.jet index e47c2612f1f..e8407abee1c 100644 --- a/compiler/testData/codegen/regressions/kt756.jet +++ b/compiler/testData/codegen/regressions/kt756.jet @@ -1,9 +1,9 @@ package demo_range -fun Int?.plus() : Int = this.sure().plus() -fun Int?.dec() : Int = this.sure().dec() -fun Int?.inc() : Int = this.sure().inc() -fun Int?.minus() : Int = this.sure().minus() +fun Int?.plus() : Int = this!!.plus() +fun Int?.dec() : Int = this!!.dec() +fun Int?.inc() : Int = this!!.inc() +fun Int?.minus() : Int = this!!.minus() fun box() : String { val x : Int? = 10 diff --git a/compiler/testData/codegen/regressions/kt757.jet b/compiler/testData/codegen/regressions/kt757.jet index ad067253ed1..2683f2b72dd 100644 --- a/compiler/testData/codegen/regressions/kt757.jet +++ b/compiler/testData/codegen/regressions/kt757.jet @@ -1,6 +1,6 @@ package demo_long -fun Long?.inv() : Long = this.sure().inv() +fun Long?.inv() : Long = this!!.inv() fun box() : String { val x : Long? = 10 diff --git a/compiler/testData/codegen/regressions/kt796_797.jet b/compiler/testData/codegen/regressions/kt796_797.jet index 03ae120b510..28a02606d39 100644 --- a/compiler/testData/codegen/regressions/kt796_797.jet +++ b/compiler/testData/codegen/regressions/kt796_797.jet @@ -1,4 +1,4 @@ -fun Array?.get(i : Int?) = this.sure().get(i.sure()) +fun Array?.get(i : Int?) = this!!.get(i!!) fun array(vararg t : T) : Array = t fun box() : String { diff --git a/compiler/testData/codegen/regressions/kt903.jet b/compiler/testData/codegen/regressions/kt903.jet index 73f481547e9..d229c0724d8 100644 --- a/compiler/testData/codegen/regressions/kt903.jet +++ b/compiler/testData/codegen/regressions/kt903.jet @@ -1,6 +1,6 @@ import java.util.ArrayList -fun Int.plus(a: Int?) = this + a.sure() +fun Int.plus(a: Int?) = this + a!! public open class PerfectNumberFinder() { open public fun isPerfect(number : Int) : Boolean { diff --git a/compiler/testData/codegen/regressions/kt944.kt b/compiler/testData/codegen/regressions/kt944.kt index 4dca91f84c0..746739fba9a 100644 --- a/compiler/testData/codegen/regressions/kt944.kt +++ b/compiler/testData/codegen/regressions/kt944.kt @@ -5,4 +5,4 @@ fun box() : String { return "OK" } -val String?.indices : IntRange get() = IntRange(0, this.sure().length) \ No newline at end of file +val String?.indices : IntRange get() = IntRange(0, this!!.length) \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java b/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java index 878d143fd4c..64961ec17d5 100644 --- a/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java +++ b/compiler/tests/org/jetbrains/jet/codegen/PrimitiveTypesTest.java @@ -320,12 +320,12 @@ public class PrimitiveTypesTest extends CodegenTestCase { } public void testSureNonnull () throws Exception { - loadText("fun box() = 10.sure().toString()"); + loadText("fun box() = 10!!.toString()"); assertFalse(generateToText().contains("IFNONNULL")); } public void testSureNullable () throws Exception { - loadText("val a : Int? = 10; fun box() = a.sure().toString()"); + loadText("val a : Int? = 10; fun box() = a!!.toString()"); assertTrue(generateToText().contains("IFNONNULL")); } diff --git a/compiler/tests/org/jetbrains/jet/runtime/JetNpeTest.java b/compiler/tests/org/jetbrains/jet/runtime/JetNpeTest.java index 60aa4b3ef12..7ca461f2c30 100644 --- a/compiler/tests/org/jetbrains/jet/runtime/JetNpeTest.java +++ b/compiler/tests/org/jetbrains/jet/runtime/JetNpeTest.java @@ -43,12 +43,12 @@ public class JetNpeTest extends CodegenTestCase { } public void testNotNull () throws Exception { - loadText("fun box() = if(10.sure() == 10) \"OK\" else \"fail\""); + loadText("fun box() = if(10!! == 10) \"OK\" else \"fail\""); blackBox(); } public void testNull () throws Exception { - loadText("fun box() = if((null : Int?).sure() == 10) \"OK\" else \"fail\""); + loadText("fun box() = if((null : Int?)!! == 10) \"OK\" else \"fail\""); // System.out.println(generateToText()); Method box = generateFunction("box"); assertThrows(box, NullPointerException.class, null);