mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Switch a pile of VarDecl::Specifier::Owneds to ::Default.
A lot of these probably should be Owned, but deciding that is work for another time.
This commit is contained in:
@@ -74,10 +74,9 @@ static void deriveRawValueInit(AbstractFunctionDecl *initDecl) {
|
||||
DeclNameLoc(), /*Implicit=*/true);
|
||||
|
||||
// rawValue param to init(rawValue:)
|
||||
auto *rawValueDecl = new (C) ParamDecl(VarDecl::Specifier::Owned, SourceLoc(),
|
||||
SourceLoc(), C.Id_rawValue,
|
||||
SourceLoc(), C.Id_rawValue,
|
||||
valueParam->getType(), parentDC);
|
||||
auto *rawValueDecl = new (C) ParamDecl(
|
||||
VarDecl::Specifier::Default, SourceLoc(), SourceLoc(), C.Id_rawValue,
|
||||
SourceLoc(), C.Id_rawValue, valueParam->getType(), parentDC);
|
||||
rawValueDecl->setInterfaceType(C.getIntDecl()->getDeclaredType());
|
||||
rawValueDecl->setImplicit();
|
||||
auto *paramList = ParameterList::createWithoutLoc(rawValueDecl);
|
||||
@@ -124,9 +123,9 @@ static ValueDecl *deriveInitDecl(TypeChecker &tc, Decl *parentDecl,
|
||||
auto *parentDC = cast<DeclContext>(parentDecl);
|
||||
|
||||
// rawValue
|
||||
auto *rawDecl = new (C) ParamDecl(VarDecl::Specifier::Owned, SourceLoc(), SourceLoc(),
|
||||
paramName, SourceLoc(), paramName,
|
||||
paramType, parentDC);
|
||||
auto *rawDecl =
|
||||
new (C) ParamDecl(VarDecl::Specifier::Default, SourceLoc(), SourceLoc(),
|
||||
paramName, SourceLoc(), paramName, paramType, parentDC);
|
||||
rawDecl->setInterfaceType(paramType);
|
||||
rawDecl->setImplicit();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user