blob: 34c687c28d88094bc5e69ca736133a7976110995 [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
extension String {
struct S {
func g: A where Optional<1 {
func d.advance(self, length: Sequence> (g.init("]]
class b<d.startIndex, AnyObject) {
case C<h, e: A {
}
protocol A {
typealias E
convenience init()
}
}
struct d<T -> d) -> String {
var d {
class A {
func b() -> Any {
deinit {
}
return "ab"[T : A.Element == b(Any))