宣言された変数の値が null でないことをチェックしている assert の呼び出しを報告します。

Using !! or ?: makes your code simpler.

The quick-fix replaces assert with !! or ?: operator in the variable initializer.

例:


  fun foo(p: Array<String?>) {
      val v = p[0]
      assert(v != null, { "Should be not null" })
  }

クイックフィックス適用後:


  fun foo(p: Array<String?>) {
      val v = p[0] ?: error("Should be not null")
  }