mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Introduce isDecl and getDeclType
fix enum logic issue fix tests guard against null types
This commit is contained in:
@@ -294,11 +294,8 @@ bool ArrayAllocation::replaceAppendContentOf() {
|
||||
ArraySemanticsCall AppendContentsOf(AppendContentOfCall);
|
||||
assert(AppendContentsOf && "Must be AppendContentsOf call");
|
||||
|
||||
NominalTypeDecl *AppendSelfArray = AppendContentsOf.getSelf()->getType().
|
||||
getASTType()->getAnyNominal();
|
||||
|
||||
// In case if it's not an Array, but e.g. an ContiguousArray
|
||||
if (AppendSelfArray != Ctx.getArrayDecl())
|
||||
if (!AppendContentsOf.getSelf()->getType().getASTType()->isArray())
|
||||
continue;
|
||||
|
||||
SILType ArrayType = ArrayValue->getType();
|
||||
|
||||
Reference in New Issue
Block a user