<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/CheckedContinuation/init(_:function:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:ScC_8functionScCyxq_G12_Concurrency12ContinuationVyxq_G_SStcfc"
  },
  "title" : "init(_:function:)"
}
-->

# init(_:function:)

Convert a non-copyable continuation to a [`CheckedContinuation`](/documentation/Swift/CheckedContinuation)

```
init(_ continuation: consuming Continuation<T, E>, function: String = #function)
```

## Discussion

A checked continuation may be escaped into contexts where
the non-copyable semantics would not be able to statically enforce
the resume-once semantics, however the correct use of the
continuation is enforced in some way at runtime.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)