Skip to content

Commit 4d144e6

Browse files
authored
Merge pull request swiftlang#32741 from xedin/rdar-55042628-5.3
[5.3][Sema] Mark the direct callee as being a callee for all ApplyExpr not just CallExpr
2 parents 879e835 + 5b98f8b commit 4d144e6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

lib/Sema/TypeCheckConstraints.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ namespace {
11611161
ExprStack.pop_back();
11621162

11631163
// Mark the direct callee as being a callee.
1164-
if (auto *call = dyn_cast<CallExpr>(expr))
1164+
if (auto *call = dyn_cast<ApplyExpr>(expr))
11651165
markDirectCallee(call->getFn());
11661166

11671167
// Fold sequence expressions.

test/Constraints/operator.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,3 +290,9 @@ func rdar_62054241() {
290290
return arr.sorted(by: <) // expected-error {{no exact matches in reference to operator function '<'}}
291291
}
292292
}
293+
294+
// SR-11399 - Operator returning IUO doesn't implicitly unwrap
295+
postfix operator ^^^
296+
postfix func ^^^ (lhs: Int) -> Int! { 0 }
297+
298+
let x: Int = 1^^^

0 commit comments

Comments
 (0)