TODO as a function. Add an overload with a string reason.

#KT-8153 Fixed
This commit is contained in:
Ilya Gorbunov
2015-07-14 19:57:15 +03:00
parent bfb116c0b2
commit f2716a973c
2 changed files with 36 additions and 14 deletions
+8 -1
View File
@@ -4,7 +4,14 @@ package kotlin
/**
* Always throws an [UnsupportedOperationException] stating that operation is not implemented.
*/
public val TODO: Nothing get() = throw UnsupportedOperationException("An operation is not implemented.")
public fun TODO(): Nothing = throw UnsupportedOperationException("An operation is not implemented.")
/**
* Always throws an [UnsupportedOperationException] stating that operation is not implemented.
*
* @param reason a string explaining why the implementation is missing.
*/
public fun TODO(reason: String): Nothing = throw UnsupportedOperationException("An operation is not implemented: $reason")
/**