Files
swift-mirror/validation-test/compiler_crashers/0727-swift-clangmoduleunit-getadaptermodule.swift
Jordan Rose 0a9d60485f Don't look into a type context to resolve types in the inheritance clause.
Instead, just check the generic parameters, then do a lookup as usual in the
enclosing context.

Fixes crash suite #58 and quite a few others (~200). This looks way more
impressive than it is; in most of these test cases it's the exact same
pattern causing the crash, and that pattern was just the last outstanding
crash trigger in a sea of garbage. (The few deleted tests were identical
to #58.)

Swift SVN r24748
2015-01-27 02:45:29 +00:00

150 lines
2.1 KiB
Swift

// RUN: not %target-swift-frontend %s -parse
// Distributed under the terms of the MIT license
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
// Test case found by fuzzing
}
}
func b<T -> T ->()
protocol b in
typealias F = a
import Foundation
}
switch x in a {
return ""
func ^(f: B
0
var b {
for c in c = 1, end)
typealias f = b> Any] = Swift.a(range.<h: [$0.endIndex - range: c, y: U) + seq
}
self)
typealias e == [c
self.init(f<Q<T: A {
struct e = b(Any, i(t: T where T {
return {
let x }
typealias F>([T>(.Type) -> : a {
import Foundation
case C(A.f = A, e<f = a
let d
protocol b where H.d: d == h
}
case c().startIndex, x }
protocol b in c = [[(""foobar""")!
}
struct X<b(T.count](e> (start, x in return [("\(T> (b: C("")
}
}
class A: ()?) -> T) {
extension NSSet {
class B<d {
}
return true
var b
class b) -> Any, end)
}
}
class A {
A<3] = B<h, k : S<j : c in a {
typealias F
class A {
""\(object1, let a<() -> {
extension NSSet {
let x in a = c
}
private let x }
class func a(s: CollectionType where f<f = F>) -> : d : A".startIndex)
}
let c: e: c(x):
func c(()
self[unowned self)
protocol b = A, AnyObject) -> V, A<T) {
}
}
}
b(self)
func e
}
println(seq: c
}
}
func g.E == F>() -> String
class A {
func g> Bool {
typealias f : P {
}
}
}
enum A {
class a<Y> (h: A {
()
protocol e = nil
protocol P {
protocol d where k) -> U) {
}
}
return g.dynamicType)
typealias e where f, Any] in
let foo as String) {
typealias d : l.init()
import Foundation
get {
func f<T>
func b: Int>()
let g : Any, A = 1)))
class C) {
typealias B
}
protocol c {
}
}
}
}
c: Array) {
}
protocol a {
assert(#object1: b: Any, e> {
}
}
func g<T> A : k) {
func g.c((")
class A : NSManagedObject {
e = b(object1: Int {
let t.C()))
return ")
func g: (self[T where f(i: (c, object2: SequenceType, i: l) {
var b(n: c) {
class a()
override func e: Any, AnyObject)
let a {
private class b: a {
func d
}
let i: d : C {
}
var b(a()
func b, x }
func b({
}
}
case b = f)
func d()) -> V, k : A<d {
b
super.Type) {
}
class b(.f : SequenceType where Optional<Q<T! {
typealias B
})")(t: 1
")
}
func x)
}
protocol b : a {
case .substringWithRange()
")
init(f.C()
func a)
typeal