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:
@@ -292,8 +292,7 @@ deriveBodyRawRepresentable_init(AbstractFunctionDecl *initDecl, void *) {
|
||||
assert(rawTy);
|
||||
rawTy = initDecl->mapTypeIntoContext(rawTy);
|
||||
|
||||
bool isStringEnum =
|
||||
(rawTy->getNominalOrBoundGenericNominal() == C.getStringDecl());
|
||||
bool isStringEnum = rawTy->isString();
|
||||
llvm::SmallVector<Expr *, 16> stringExprs;
|
||||
|
||||
Type enumType = parentDC->getDeclaredTypeInContext();
|
||||
|
||||
Reference in New Issue
Block a user