Add known type checker crashers.

Add minimized tests for:
    rdar://problem/27261929
    rdar://problem/27329076
This commit is contained in:
Mark Lacey
2016-08-15 15:55:54 -07:00
parent b3819c6783
commit 5307a79b82
2 changed files with 23 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
// RUN: not --crash %target-swift-frontend %s -parse
public enum R<V> {
case value(V)
}
public struct P<I, O> {
public var run: (I) -> R<(O, I)>
public init(run: @escaping (I) -> R<(O, I)>) {
self.run = run
}
public func test() -> P<I, [O]> {
return P<I, [O]> { input in
var output: [O] = []
return R<([O], I)>.value(output, input)
}
}
}

View File

@@ -0,0 +1,3 @@
// RUN: not --crash %target-swift-frontend %s -parse
_ = try [ { return .D($0[0]) } ]