Skip to content

Commit

Permalink
Fix deprecated copy for BIT_SET_FLAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
lukellmann committed Aug 24, 2023
1 parent b571bbd commit 57dde0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/src/commonMain/kotlin/entity/Permission.kt
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ public class Permissions internal constructor(
@kotlin.internal.LowPriorityInOverloadResolution
public inline fun copy(block: PermissionsBuilder.() -> Unit): Permissions {
contract { callsInPlace(block, EXACTLY_ONCE) }
return PermissionsBuilder(code).apply(block).permissions()
return PermissionsBuilder(code.copy()).apply(block).permissions()
}

override fun equals(other: Any?): Boolean = this === other ||
Expand Down
2 changes: 1 addition & 1 deletion gateway/src/commonMain/kotlin/Intent.kt
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ public class Intents internal constructor(
@kotlin.internal.LowPriorityInOverloadResolution
public inline fun copy(block: IntentsBuilder.() -> Unit): Intents {
contract { callsInPlace(block, EXACTLY_ONCE) }
return IntentsBuilder(code).apply(block).flags()
return IntentsBuilder(code.copy()).apply(block).flags()
}

override fun equals(other: Any?): Boolean = this === other ||
Expand Down

0 comments on commit 57dde0c

Please sign in to comment.