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

usage of a noncopyable type that compiler can't verify #72803

Open
LeeroyDing opened this issue Apr 3, 2024 · 1 comment
Open

usage of a noncopyable type that compiler can't verify #72803

LeeroyDing opened this issue Apr 3, 2024 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. noncopyable struct/enum Feature → declarations: Noncopyable value type declarations ownership Feature: Ownership modifiers and semantics

Comments

@LeeroyDing
Copy link

Description

No response

Reproduction

struct Struct: ~Copyable {
  final class Class {
    var value = 1
  }
  let property: Class
  func doThing() -> Int {
    return property.value
  }
}

Workaround: delete final in the class.

Expected behavior

It should compile..?

Environment

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

Additional information

No response

@LeeroyDing LeeroyDing added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Apr 3, 2024
@tbkka tbkka added the ownership Feature: Ownership modifiers and semantics label Apr 8, 2024
@tbkka
Copy link
Contributor

tbkka commented Apr 8, 2024

CC: @jckarter @kavon

@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 ownership Feature: Ownership modifiers and semantics
Projects
None yet
Development

No branches or pull requests

3 participants