mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Move the resolution of extension types, operator declarations, and superclasses into the type checker.
This eliminates the duplicate IdentifierType resolution code (fixing <rdar://problem/13946567>), and moves us a step closure to elimining name binding as a separate pass. Swift SVN r5940
This commit is contained in:
@@ -674,8 +674,12 @@ Type FuncDecl::getExtensionType() const {
|
||||
|
||||
case DeclContextKind::NominalTypeDecl:
|
||||
return cast<NominalTypeDecl>(DC)->getDeclaredType();
|
||||
case DeclContextKind::ExtensionDecl:
|
||||
return cast<ExtensionDecl>(DC)->getExtendedType();
|
||||
case DeclContextKind::ExtensionDecl: {
|
||||
auto ext = cast<ExtensionDecl>(DC);
|
||||
if (ext->isInvalid())
|
||||
return ErrorType::get(getASTContext());
|
||||
return ext->getExtendedType();
|
||||
}
|
||||
}
|
||||
llvm_unreachable("bad context kind");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user