@@ -2014,9 +2014,7 @@ static bool canDeriveCodable(NominalTypeDecl *NTD,
2014
2014
// Structs, classes and enums can explicitly derive Encodable and Decodable
2015
2015
// conformance (explicitly meaning we can synthesize an implementation if
2016
2016
// a type conforms manually).
2017
- if (!isa<StructDecl>(NTD) && !isa<ClassDecl>(NTD) &&
2018
- !(NTD->getASTContext ().LangOpts .EnableExperimentalEnumCodableDerivation
2019
- && isa<EnumDecl>(NTD))) {
2017
+ if (!isa<StructDecl>(NTD) && !isa<ClassDecl>(NTD) && !isa<EnumDecl>(NTD)) {
2020
2018
return false ;
2021
2019
}
2022
2020
@@ -2039,8 +2037,7 @@ bool DerivedConformance::canDeriveEncodable(NominalTypeDecl *NTD) {
2039
2037
ValueDecl *DerivedConformance::deriveEncodable (ValueDecl *requirement) {
2040
2038
// We can only synthesize Encodable for structs and classes.
2041
2039
if (!isa<StructDecl>(Nominal) && !isa<ClassDecl>(Nominal) &&
2042
- !(Context.LangOpts .EnableExperimentalEnumCodableDerivation
2043
- && isa<EnumDecl>(Nominal)))
2040
+ !isa<EnumDecl>(Nominal))
2044
2041
return nullptr ;
2045
2042
2046
2043
if (requirement->getBaseName () != Context.Id_encode ) {
@@ -2070,8 +2067,7 @@ ValueDecl *DerivedConformance::deriveEncodable(ValueDecl *requirement) {
2070
2067
ValueDecl *DerivedConformance::deriveDecodable (ValueDecl *requirement) {
2071
2068
// We can only synthesize Encodable for structs and classes.
2072
2069
if (!isa<StructDecl>(Nominal) && !isa<ClassDecl>(Nominal) &&
2073
- !(Context.LangOpts .EnableExperimentalEnumCodableDerivation
2074
- && isa<EnumDecl>(Nominal)))
2070
+ !isa<EnumDecl>(Nominal))
2075
2071
return nullptr ;
2076
2072
2077
2073
if (requirement->getBaseName () != DeclBaseName::createConstructor ()) {
0 commit comments