Skip to content

Commit db376a9

Browse files
committed
[sourcekitd] Add test case for rdar://70017224
rdar://70017224 seems to be fixed. Add a test case for it.
1 parent e1e0f54 commit db376a9

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// RUN: %empty-directory(%t)
2+
3+
// RUN: echo '@_typeEraser(AnyView) public protocol View {}' > %t/Module.swift
4+
// RUN: echo 'public struct AnyView : View {' >> %t/Module.swift
5+
// RUN: echo ' public init<T: View>(erasing: T) {}' >> %t/Module.swift
6+
// RUN: echo '}' >> %t/Module.swift
7+
// RUN: %swift -emit-module -o %t/Module.swiftmodule %t/Module.swift -parse-as-library
8+
9+
// RUN: %sourcekitd-test -req=cursor -pos=13:13 %s -- -I %t %s | %FileCheck %s
10+
11+
import Module
12+
13+
struct Foo: View {}
14+
15+
// CHECK: <Declaration>@_typeEraser(<Type usr="s:6Module7AnyViewV">AnyView</Type>) protocol View</Declaration>

0 commit comments

Comments
 (0)