Skip to content

Commit 0927930

Browse files
committed
New type decoder test to verify that variadic tuples are rejected
1 parent 973ec51 commit 0927930

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/TypeDecoder/invalid_types.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// RUN: %empty-directory(%t)
2+
3+
// RUN: %target-build-swift -emit-executable %s -g -o %t/structural_types -emit-module
4+
// RUN: sed -ne '/\/\/ *DEMANGLE: /s/\/\/ *DEMANGLE: *//p' < %s > %t/input
5+
// RUN: %lldb-moduleimport-test %t/structural_types -type-from-mangled=%t/input | %FileCheck %s
6+
7+
8+
// If this were supported, it would be `(t: τ_0_0...)`
9+
// But tuples with a variadic 'd' marker are not actually valid Swift types, so
10+
// the type decoder rejects them.
11+
// DEMANGLE: $sx1td_t
12+
// CHECK: Can't resolve type of $sx1td_t

0 commit comments

Comments
 (0)