Skip to content

Commit 32f75fd

Browse files
committed
Add test for deserializing opaque types across modules
1 parent 51f27a9 commit 32f75fd

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
public protocol Foo {}
2+
3+
public struct FooImpl: Foo {
4+
public init() {}
5+
}
6+
7+
public func anyFoo() -> __opaque Foo {
8+
return FooImpl()
9+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-frontend -emit-module-path %t/OpaqueCrossFileB.swiftmodule -module-name OpaqueCrossFileB %S/Inputs/OpaqueCrossFileB.swift
3+
// RUN: %target-swift-frontend -I %t -emit-ir -verify %s
4+
5+
import OpaqueCrossFileB
6+
7+
dump(anyFoo())
8+

0 commit comments

Comments
 (0)