Skip to content

Commit 3796b32

Browse files
committed
AST: Relax assertion in getContextSubstitutionMap()
1 parent b2d34ce commit 3796b32

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/AST/TypeSubstitution.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ SubstitutionMap TypeBase::getContextSubstitutionMap() {
546546

547547
Type baseTy(this);
548548

549-
assert(!baseTy->hasLValueType() &&
549+
assert(!baseTy->is<LValueType>() &&
550550
!baseTy->is<AnyMetatypeType>() &&
551551
!baseTy->is<ErrorType>());
552552

@@ -628,7 +628,7 @@ TypeBase::getContextSubstitutions(const DeclContext *dc,
628628
assert(dc->isTypeContext());
629629
Type baseTy(this);
630630

631-
assert(!baseTy->hasLValueType() &&
631+
assert(!baseTy->is<LValueType>() &&
632632
!baseTy->is<AnyMetatypeType>() &&
633633
!baseTy->is<ErrorType>());
634634

Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// {"signature":"swift::TypeBase::getContextSubstitutions(swift::DeclContext const*, swift::GenericEnvironment*)"}
2-
// RUN: not --crash %target-swift-frontend -typecheck %s
2+
// RUN: not %target-swift-frontend -typecheck %s
33
{ $0?={

0 commit comments

Comments
 (0)