Skip to content

Commit edd3015

Browse files
committed
Add TypeDecoder test
1 parent a6b5a41 commit edd3015

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// RUN: %empty-directory(%t)
2+
3+
// RUN: %target-build-swift -emit-executable %s -g -o %t/opaque_return_type -emit-module
4+
// RUN: sed -ne '/\/\/ *DEMANGLE: /s/\/\/ *DEMANGLE: *//p' < %s > %t/input
5+
// RUN: %lldb-moduleimport-test %t/opaque_return_type -type-from-mangled=%t/input | %FileCheck %s
6+
7+
protocol P {}
8+
extension Int: P {}
9+
10+
func foo() -> some P { return 0 }
11+
var prop: some P { return 0 }
12+
13+
// DEMANGLE: $s18opaque_return_type3fooQryFQOyQo_
14+
// CHECK: some P
15+
16+
// DEMANGLE: $s18opaque_return_type4propQrvpQOyQo_
17+
// CHECK: some P

0 commit comments

Comments
 (0)