mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #23701 from DougGregor/property-delegates-as-custom-attributes
This commit is contained in:
@@ -2100,9 +2100,12 @@ namespace {
|
||||
// will avoid exponential typecheck behavior in the case of
|
||||
// tuples, nested arrays, and dictionary literals.
|
||||
//
|
||||
// FIXME: This should be handled in the solver, not here.
|
||||
//
|
||||
// Otherwise, create a new type variable.
|
||||
auto ty = Type();
|
||||
if (!var->hasNonPatternBindingInit()) {
|
||||
if (!var->hasNonPatternBindingInit() &&
|
||||
!var->getAttachedPropertyDelegate()) {
|
||||
if (auto boundExpr = locator.trySimplifyToExpr()) {
|
||||
if (!boundExpr->isSemanticallyInOutExpr())
|
||||
ty = CS.getType(boundExpr)->getRValueType();
|
||||
@@ -2487,7 +2490,8 @@ namespace {
|
||||
}
|
||||
|
||||
Type visitOpaqueValueExpr(OpaqueValueExpr *expr) {
|
||||
llvm_unreachable("Already type checked");
|
||||
assert(expr->isPlaceholder() && "Already type checked");
|
||||
return expr->getType();
|
||||
}
|
||||
|
||||
Type visitDefaultArgumentExpr(DefaultArgumentExpr *expr) {
|
||||
@@ -3287,7 +3291,7 @@ namespace {
|
||||
expr = value->second;
|
||||
continue;
|
||||
} else {
|
||||
assert(eraseOpenExistentialsOnly &&
|
||||
assert((eraseOpenExistentialsOnly || OVE->isPlaceholder()) &&
|
||||
"Didn't see this OVE in a containing OpenExistentialExpr?");
|
||||
// NOTE: In 'eraseOpenExistentialsOnly' mode, ASTWalker may walk
|
||||
// into other kind of expressions holding OVE.
|
||||
|
||||
Reference in New Issue
Block a user