Skip to content

Commit

Permalink
Rename contextReceiver to contextReceivers
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Apr 15, 2022
1 parent e6316a0 commit 5631a95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kotlinpoet/src/main/java/com/squareup/kotlinpoet/FunSpec.kt
Expand Up @@ -367,13 +367,13 @@ public class FunSpec private constructor(
}

@ExperimentalKotlinPoetApi
public fun contextReceiver(receiverTypes: Collection<TypeName>): Builder = apply {
public fun contextReceivers(receiverTypes: Collection<TypeName>): Builder = apply {
check(!name.isConstructor) { "$name: constructors cannot have context receivers" }
contextReceiverTypes += receiverTypes
}

@ExperimentalKotlinPoetApi
public fun contextReceiver(vararg receiverType: TypeName): Builder = contextReceiver(receiverType.toList())
public fun contextReceivers(vararg receiverType: TypeName): Builder = contextReceiver(receiverType.toList())

@JvmOverloads public fun receiver(
receiverType: TypeName,
Expand Down

0 comments on commit 5631a95

Please sign in to comment.