mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
23 lines
450 B
Swift
23 lines
450 B
Swift
// RUN: %target-swift-frontend -primary-file %s -emit-ir -g -o - | FileCheck %s
|
|
|
|
// Don't crash when emitting debug info for anonymous variables.
|
|
// CHECK: !DILocalVariable({{.*}} name: "_"
|
|
|
|
func markUsed<T>(t: T) {}
|
|
|
|
protocol F_ {
|
|
func successor() -> Self
|
|
}
|
|
|
|
protocol F : F_ {
|
|
func ~> (Self, (_Distance, (Self))) -> Int
|
|
}
|
|
|
|
struct _Distance {}
|
|
|
|
func ~> <I: F_>(self_:I, (_Distance, (I))) -> Int {
|
|
self_.successor()
|
|
markUsed("F")
|
|
return 0
|
|
}
|