Skip to content

Commit 0efcfbb

Browse files
committed
IUO: Verify that we do not expect to see SpecifierTypeRepr in typed patterns.
1 parent 06dfe86 commit 0efcfbb

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)