mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
AST: Move a few methods from VarDecl down to ParamDecl
This commit is contained in:
@@ -77,7 +77,7 @@ deriveRawValueInit(AbstractFunctionDecl *initDecl, void *) {
|
||||
|
||||
// rawValue param to init(rawValue:)
|
||||
auto *rawValueDecl = new (C) ParamDecl(
|
||||
VarDecl::Specifier::Default, SourceLoc(), SourceLoc(), C.Id_rawValue,
|
||||
ParamDecl::Specifier::Default, SourceLoc(), SourceLoc(), C.Id_rawValue,
|
||||
SourceLoc(), C.Id_rawValue, parentDC);
|
||||
rawValueDecl->setInterfaceType(C.getIntDecl()->getDeclaredType());
|
||||
rawValueDecl->setImplicit();
|
||||
@@ -119,7 +119,7 @@ static ValueDecl *deriveInitDecl(DerivedConformance &derived, Type paramType,
|
||||
|
||||
// rawValue
|
||||
auto *rawDecl =
|
||||
new (C) ParamDecl(VarDecl::Specifier::Default, SourceLoc(), SourceLoc(),
|
||||
new (C) ParamDecl(ParamDecl::Specifier::Default, SourceLoc(), SourceLoc(),
|
||||
paramName, SourceLoc(), paramName, parentDC);
|
||||
rawDecl->setInterfaceType(paramType);
|
||||
rawDecl->setImplicit();
|
||||
|
||||
Reference in New Issue
Block a user