mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Default argument generator functions are not dynamically replaceable for now
This commit is contained in:
@@ -1038,7 +1038,8 @@ static bool isDesignatedConstructorForClass(ValueDecl *decl) {
|
||||
}
|
||||
|
||||
bool SILDeclRef::canBeDynamicReplacement() const {
|
||||
if (kind == SILDeclRef::Kind::Destroyer)
|
||||
if (kind == SILDeclRef::Kind::Destroyer ||
|
||||
kind == SILDeclRef::Kind::DefaultArgGenerator)
|
||||
return false;
|
||||
if (kind == SILDeclRef::Kind::Initializer)
|
||||
return isDesignatedConstructorForClass(getDecl());
|
||||
@@ -1048,6 +1049,8 @@ bool SILDeclRef::canBeDynamicReplacement() const {
|
||||
}
|
||||
|
||||
bool SILDeclRef::isDynamicallyReplaceable() const {
|
||||
if (kind == SILDeclRef::Kind::DefaultArgGenerator)
|
||||
return false;
|
||||
if (isStoredPropertyInitializer())
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user