mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Sema: Add some asserts
This commit is contained in:
@@ -1387,7 +1387,9 @@ void ConstraintSystem::resolveOverload(ConstraintLocator *locator,
|
||||
bool isDynamicResult
|
||||
= choice.getKind() == OverloadChoiceKind::DeclViaDynamic;
|
||||
// Retrieve the type of a reference to the specific declaration choice.
|
||||
if (choice.getBaseType()) {
|
||||
if (auto baseTy = choice.getBaseType()) {
|
||||
assert(!baseTy->hasTypeParameter());
|
||||
|
||||
auto getDotBase = [](const Expr *E) -> const DeclRefExpr * {
|
||||
if (E == nullptr) return nullptr;
|
||||
switch (E->getKind()) {
|
||||
@@ -1406,7 +1408,7 @@ void ConstraintSystem::resolveOverload(ConstraintLocator *locator,
|
||||
auto anchor = locator ? locator->getAnchor() : nullptr;
|
||||
auto base = getDotBase(anchor);
|
||||
std::tie(openedFullType, refType)
|
||||
= getTypeOfMemberReference(choice.getBaseType(), choice.getDecl(),
|
||||
= getTypeOfMemberReference(baseTy, choice.getDecl(),
|
||||
isTypeReference, isDynamicResult,
|
||||
choice.getFunctionRefKind(),
|
||||
locator, base, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user