Files
swift-mirror/test/SILOptimizer/diagnose_lifetime_issues_objc.swift
Nate Chandler ddccaa7d9c [Frontend] Removed lexical-borrow-scope flag.
Adding `move_value [lexical]` and `begin_borrow [lexical]` should happen
all the time at this point.  Remove the ability to omit these
instructions and update the corresponding tests.
2024-02-05 17:34:10 -08:00

14 lines
369 B
Swift

// RUN: %target-swift-frontend -emit-sil %s -enable-copy-propagation -o /dev/null -verify
// REQUIRES: objc_interop
import Foundation
class MyServiceDelegate : NSObject, NSXPCListenerDelegate { }
public func warningForDeadDelegate() {
let delegate = MyServiceDelegate()
let listener = NSXPCListener.service()
listener.delegate = delegate
listener.resume()
}