Skip to content

Commit 28af3a2

Browse files
authored
Merge pull request #13726 from rudkx/verify-no-specifier-type-repr-in-typed-patterns
IUO: Verify that we do not expect to see SpecifierTypeRepr in typed p…
2 parents 8246ce8 + 0efcfbb commit 28af3a2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Sema/TypeCheckPattern.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,8 @@ static bool validateTypedPattern(TypeChecker &TC, DeclContext *DC,
680680

681681
TP->setType(TL.getType());
682682

683+
assert(!dyn_cast_or_null<SpecifierTypeRepr>(TL.getTypeRepr()));
684+
683685
// Track whether the decl in this typed pattern should be
684686
// implicitly unwrapped as needed during expression type checking.
685687
if (TL.getTypeRepr() && TL.getTypeRepr()->getKind() ==

0 commit comments

Comments
 (0)