import Foundation

protocol FooDelegate: Bar {}

final class B {}

class Fыoo {
    let mylet = 0

}

func foo<T_Foo>() {}

class Foo {
    var foo: Int {
        get {
            return 20
        }
    }
}

class TestDifferent1: NSObject {
    enum Numbers: Decimal {
        case one, two
    }

    let label: IBOutlet!

    private let myLet_ = 0

    func foo() {
        fatalError()

        foo.map {
            return $0 + 1
        }
    }

    func function(a: Int, a: Int, a: Int, a: Int, a: Int, a: Int, b: Int, c: Int, d: Int, e: Int, f: Int, g: Int) {
    }

    override func observeValue(
        forKeyPath keyPath: String?, of object: Any?,
        change: [NSKeyValueChangeKey: Any]?,
        context: UnsafeMutableRawPointer?
    ) {
        _ = Set(syntaxKinds).intersection(commentAndStringKindsSet).isEmpty

        [1, 2].map  {
            number -> Int in
            number + 1
        }

        myList.filter { $0 % 2 == 0 }.first

        for user in users {
            if user.id == 1 {
                return // true <-- uncommenting this will stop this file from linting
            }
        }

        NSNumber() as! Int
        func a() throws {}; try! a()

        dict["abc"]!.bar("B")

        switch foo {
        case .bar:
            fallthrough
        case .bar2:
            something()
        }

        let set = Set.init(arrayLiteral: 1, 2)

        (myList.first { $0 % 2 == 0 }) != nil

        count == 0

        [1].flatMap { String.init($0) }

        switch foo {
            case .bar(): break
        }

        let abc: (Void) -> Void = {}

        [1, 2].map() { number in
            number + 1
        }
    }

    @discardableResult func foo() -> Any {
        let foo = UIDevice.init()
        return nc.addObserver(forName: .NSSystemTimeZoneDidChange, object: nil, queue: nil, using: { })
    }

    class CInline {
        @inline(__always) dynamic internal func f() {}
    }
}
