blob: 309dbdafdce74fd4deb9ec3fa30efee7e96ad490 [file] [log] [blame]
// This source file is part of the Swift.org open source project
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
// RUN: not %target-swift-frontend %s -typecheck
func f<r>() -> (r, r -> r) -> r {
f r f.j = {
}
{
r) {
s }
}
protocol f {
class func j()
}
class f: f{ class func j {}
protocol j {
class func m()
}
class r: j {
class func m() { }
}
(r() n j).p.m()
j=k n j=k
protocol r {
class func q()
}
s m {
m f: r.q
func q() {
f.q()
}
(l, () -> ())
}
func f<l : o>(r: l)