mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[ModuleInterface] Allow conformances to be missing value witnesses (#18932)
It's not clear whether we'll actually need this feature in the long run, but we certainly need it now because non-@usableFromInline members can (currently) satisfy public requirements when a @usableFromInline internal type conforms to a public protocol. In these cases, we'll treat the witnesses as present but opaque, and clients will perform dynamic dispatch when using them even when a generic function gets specialized. With this, we're able to generate a textual interface for the standard library, compile it back to a swiftmodule, and use it to build a Hello World program!
This commit is contained in:
@@ -2697,6 +2697,7 @@ ModuleFile::getDeclCheckedImpl(DeclID DID) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
theStruct->setAddedImplicitInitializers();
|
||||
if (isImplicit)
|
||||
theStruct->setImplicit();
|
||||
theStruct->setIsObjC(isObjC);
|
||||
@@ -3604,6 +3605,7 @@ ModuleFile::getDeclCheckedImpl(DeclID DID) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
theEnum->setAddedImplicitInitializers();
|
||||
if (isImplicit)
|
||||
theEnum->setImplicit();
|
||||
theEnum->setIsObjC(isObjC);
|
||||
|
||||
Reference in New Issue
Block a user