mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Fix a crash involving extensions.
Swift SVN r1411
This commit is contained in:
@@ -310,8 +310,10 @@ static Expr *BindNameToIVar(UnresolvedDeclRefExpr *UDRE, FuncDecl *CurFD,
|
||||
if (CurFD->isStatic()) {
|
||||
if (ProtocolType *Proto = ExtendedType->getAs<ProtocolType>())
|
||||
StaticAlias = Proto->TheDecl;
|
||||
else if (OneOfType *OneOf = ExtendedType->getAs<OneOfType>())
|
||||
StaticAlias = OneOf->getDecl();
|
||||
else
|
||||
StaticAlias = ExtendedType->castTo<OneOfType>()->getDecl();
|
||||
return 0;
|
||||
|
||||
ExtendedType = MetaTypeType::get(StaticAlias);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user