mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Parse default-argument expressions in an initializer context.
Swift SVN r11178
This commit is contained in:
@@ -651,7 +651,11 @@ class CodeCompletionCallbacksImpl : public CodeCompletionCallbacks {
|
||||
return typeCheckCompletionDecl(cast<NominalTypeDecl>(DC));
|
||||
}
|
||||
if (DC->getContextKind() == DeclContextKind::TopLevelCodeDecl) {
|
||||
return typeCheckTopLevelCodeDecl(dyn_cast<TopLevelCodeDecl>(DC));
|
||||
// Code completion can see top-level code declarations that
|
||||
// haven't been filled in properly.
|
||||
auto code = cast<TopLevelCodeDecl>(DC);
|
||||
if (!code->getBody()) return true;
|
||||
return typeCheckTopLevelCodeDecl(code);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user