 import UIKit
 
 /// Optional delegate protocol to be implemented by a LayoutNode's owner
-@objc public protocol LayoutDelegate: class {
+@objc public protocol LayoutDelegate {
 
     /// Notify that an error occured in the node tree
     @objc optional func layoutNode(_ layoutNode: LayoutNode, didDetectError error: Error)

            }
            return
        }
        var delegate = self.delegate
        var responder = delegate as? UIResponder
        while delegate != nil || responder != nil {
            if let errorFn = delegate?.layoutNode(_:didDetectError:) {
                if error.isTransient {
                    _unhandledError = nil
                }
                errorFn(self, error)
                return
            }
            responder = responder?.next
            delegate = responder as? LayoutDelegate
        }
    }


            _delegate = newValue
        }
    }
    private func delegate(for selector: Selector) -> LayoutDelegate? {
        var delegate = self.delegate
        var responder = delegate as? UIResponder
        while delegate != nil || responder != nil {
            if (delegate as AnyObject).responds(to: selector) {
                return delegate
            }
            responder = responder?.next
            delegate = responder as? LayoutDelegate
        }
        return parent?.delegate(for: selector)
    }

    /// Get the view class without side-effects of accessing view
    var viewClass: UIView.Type { return _class as? UIView.Type ?? UIView.self }

    /// Get the view controller class without side-effects of accessing view
    var viewControllerClass: UIViewController.Type? { return _class as? UIViewController.Type }

    // For internal use
