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

Pattern that the region based isolation checker does not understand how to check. #78061

Open
gfreezy opened this issue Dec 9, 2024 · 0 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels

Comments

@gfreezy
Copy link

gfreezy commented Dec 9, 2024

Description

XCode complains:
Pattern that the region based isolation checker does not understand how to check. Please file a bug.

Reproduction

 import SwiftUI
 import UIKit

 public actor TextLayoutManager: NSObject, NSTextContentStorageDelegate, NSTextLayoutManagerDelegate
 {
     private let textContentStorage: NSTextContentStorage
     private let textLayoutManager: NSTextLayoutManager
     public let textContainer: NSTextContainer
     private(set) var lineRects: [CGRect] = []

     public override init() {
         textLayoutManager = NSTextLayoutManager()
         textContentStorage = NSTextContentStorage()
         textContainer = NSTextContainer(size: CGSize(width: 0, height: 0))
         super.init()
         textContainer.lineFragmentPadding = 0
         textContainer.lineBreakMode = .byWordWrapping
         textContainer.maximumNumberOfLines = 0
         textLayoutManager.textContainer = textContainer
         textLayoutManager.delegate = self
         textContentStorage.delegate = self
         textContentStorage.textStorage = NSTextStorage()
         textContentStorage.addTextLayoutManager(textLayoutManager)
     }
 }

Expected behavior

It should compiles.

Environment

swift-driver version: 1.115 Apple Swift version 6.0.2 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
Target: arm64-apple-macosx15.0

Additional information

No response

@gfreezy gfreezy added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Dec 9, 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. triage needed This issue needs more specific labels
Projects
None yet
Development

No branches or pull requests

1 participant