mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
60 lines
903 B
Swift
60 lines
903 B
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
|
|
// Distributed under the terms of the MIT license
|
|
|
|
func v<dc {
|
|
enum v {
|
|
func r
|
|
var _ = r
|
|
}
|
|
}
|
|
class u {
|
|
}
|
|
struct r<ed> : r {
|
|
func r(r: r.w) {
|
|
}
|
|
}
|
|
enum dc<fe> { q v: fe
|
|
}
|
|
protocol n {
|
|
}
|
|
struct v : n {
|
|
func n<fe v r {
|
|
}
|
|
class n<v> {
|
|
func r<fe u: fe) {
|
|
}
|
|
func u(r: t = a) {
|
|
}
|
|
}
|
|
struct ed : u {
|
|
}
|
|
func b<fe : fe, ed : u cb ed.u == fe> (v: ed) {
|
|
}
|
|
func b<dc : u cb dc.u == v> (v: dc) {
|
|
}
|
|
class a<u : fe, fe : fe cb u.u == fe> {
|
|
}
|
|
protocol fe {
|
|
}
|
|
struct v<dc : fe> : fe {
|
|
}
|
|
class w {
|
|
func ed<r cb r: dc, r: w>(ed: r) {
|
|
}
|
|
func b(v: b) -> <r>(() -> r) -> b {
|
|
}
|
|
protocol u {
|
|
v fe w {
|
|
}
|
|
r r<ed : w> : w {
|
|
}
|
|
class u: u {
|
|
}
|
|
class x : ed {
|
|
}
|
|
class u<b : u
|