Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected "copy of noncopyable typed value" error. #72651

Open
oscbyspro opened this issue Mar 28, 2024 · 0 comments
Open

Unexpected "copy of noncopyable typed value" error. #72651

oscbyspro opened this issue Mar 28, 2024 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. noncopyable struct/enum Feature → declarations: Noncopyable value type declarations

Comments

@oscbyspro
Copy link
Contributor

oscbyspro commented Mar 28, 2024

Description

I got this error message while consuming a copyable value in Swift 5.10:

Copy of noncopyable typed value. This is a compiler bug. Please file a bug with a small example of the bug

Reproduction

struct PleaseFileABugWithASmallExampleOfTheBug {
    let a: Bool                         // ✅
    var b: Bool { consuming get { a } } // ✅
    var c: Bool { consuming get { b } } // 🛑
}

Expected behavior

I would expect it to compile without any errors.

Environment

swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0

Additional information

No response

@oscbyspro oscbyspro added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Mar 28, 2024
@hborla hborla added noncopyable struct/enum Feature → declarations: Noncopyable value type declarations and removed triage needed This issue needs more specific labels labels Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. noncopyable struct/enum Feature → declarations: Noncopyable value type declarations
Projects
None yet
Development

No branches or pull requests

2 participants