Files
swift-mirror/test/SourceKit/CursorInfo/rdar_70017224.swift
Alex Hoppen db376a9627 [sourcekitd] Add test case for rdar://70017224
rdar://70017224 seems to be fixed. Add a test case for it.
2021-03-18 16:03:32 +01:00

16 lines
596 B
Swift

// RUN: %empty-directory(%t)
// RUN: echo '@_typeEraser(AnyView) public protocol View {}' > %t/Module.swift
// RUN: echo 'public struct AnyView : View {' >> %t/Module.swift
// RUN: echo ' public init<T: View>(erasing: T) {}' >> %t/Module.swift
// RUN: echo '}' >> %t/Module.swift
// RUN: %swift -emit-module -o %t/Module.swiftmodule %t/Module.swift -parse-as-library
// RUN: %sourcekitd-test -req=cursor -pos=13:13 %s -- -I %t %s | %FileCheck %s
import Module
struct Foo: View {}
// CHECK: <Declaration>@_typeEraser(<Type usr="s:6Module7AnyViewV">AnyView</Type>) protocol View</Declaration>