You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 12, 2024. It is now read-only.
This originally used NSImage instead of NSObject but it fails just the same
import AppKit
public extension Array where Element : NSObject {
public func gradient(_ transform: ((_ gradient: inout CAGradientLayer) -> CAGradientLayer)? = nil) -> CAGradientLayer {
var gradient = CAGradientLayer()
return gradient
}
}
Error (Fatal): SwiftRepro-Array-Extension0.swift:7:40: error: @escaping attribute may only be used in function parameter position
transform: UnsafePointer<Optional<@escaping (_: UnsafeMutablePointer<CAGradientLayer>,
~^~~~~~~~~
SwiftRepro-Array-Extension0.swift:7:40: error: @escaping attribute may only be used in function parameter position
transform: UnsafePointer<Optional<@escaping (_: UnsafeMutablePointer<CAGradientLayer>,
~^~~~~~~~~
SwiftRepro-Array-Extension0.swift:7:40: error: @escaping attribute may only be used in function parameter position
transform: UnsafePointer<Optional<@escaping (_: UnsafeMutablePointer<CAGradientLayer>,
~^~~~~~~~~
SwiftRepro-Array-Extension0.swift:11:17: error: 'T0' is not a subtype of 'NSObject'
return this.gradient(transform.pointee);
~~~~~^~~~~~~~
(Exception)
The text was updated successfully, but these errors were encountered:
This originally used NSImage instead of NSObject but it fails just the same
The text was updated successfully, but these errors were encountered: