Job.onCompletion is renamed to Job.invokeOnCompletion for consistency
diff --git a/kotlinx-coroutines-core/src/main/kotlin/kotlinx/coroutines/experimental/Deferred.kt b/kotlinx-coroutines-core/src/main/kotlin/kotlinx/coroutines/experimental/Deferred.kt
index c6bfdc0..c3954d3 100644
--- a/kotlinx-coroutines-core/src/main/kotlin/kotlinx/coroutines/experimental/Deferred.kt
+++ b/kotlinx-coroutines-core/src/main/kotlin/kotlinx/coroutines/experimental/Deferred.kt
@@ -71,7 +71,7 @@
      * [completed][isCompleted] yet. It throws the corresponding exception if this deferred has
      * [completed exceptionally][isCompletedExceptionally].
      *
-     * This function is designed to be used from [onCompletion] handlers, when there is an absolute certainty that
+     * This function is designed to be used from [invokeOnCompletion] handlers, when there is an absolute certainty that
      * the value is already complete.
      */
     public fun getCompleted(): T
@@ -142,7 +142,7 @@
 
     @Suppress("UNCHECKED_CAST")
     private suspend fun awaitSuspend(): T = suspendCancellableCoroutine { cont ->
-        cont.unregisterOnCompletion(onCompletion {
+        cont.unregisterOnCompletion(invokeOnCompletion {
             val state = getState()
             check(state !is Incomplete)
             if (state is CompletedExceptionally)