mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Re-organize the checking of @IBOutlet to better handle implicit optionalification.
Swift SVN r16201
This commit is contained in:
@@ -725,6 +725,14 @@ bool PatternBindingDecl::hasStorage() const {
|
||||
return HasStorage;
|
||||
}
|
||||
|
||||
VarDecl *PatternBindingDecl::getSingleVar() const {
|
||||
auto pattern = getPattern()->getSemanticsProvidingPattern();
|
||||
if (auto named = dyn_cast<NamedPattern>(pattern))
|
||||
return named->getDecl();
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
SourceLoc TopLevelCodeDecl::getStartLoc() const {
|
||||
return Body->getStartLoc();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user