File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -1052,6 +1052,9 @@ namespace {
1052
1052
Type importedTypeArg = ProtocolCompositionType::get (
1053
1053
Impl.SwiftContext , memberTypes,
1054
1054
hasExplicitAnyObject);
1055
+ if (Impl.SwiftContext .LangOpts .EnableExplicitExistentialTypes ) {
1056
+ importedTypeArg = ExistentialType::get (importedTypeArg);
1057
+ }
1055
1058
importedTypeArgs.push_back (importedTypeArg);
1056
1059
}
1057
1060
}
@@ -1203,6 +1206,10 @@ namespace {
1203
1206
importedType = ProtocolCompositionType::get (Impl.SwiftContext ,
1204
1207
members,
1205
1208
/* HasExplicitAnyObject=*/ false );
1209
+
1210
+ if (Impl.SwiftContext .LangOpts .EnableExplicitExistentialTypes ) {
1211
+ importedType = ExistentialType::get (importedType);
1212
+ }
1206
1213
}
1207
1214
1208
1215
// Class or Class<P> maps to an existential metatype.
Original file line number Diff line number Diff line change 1
1
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -verify -swift-version 4 -I %S/Inputs/custom-modules %s
2
+ // RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -enable-explicit-existential-types -verify -swift-version 4 -I %S/Inputs/custom-modules %s
2
3
3
4
// REQUIRES: objc_interop
4
5
You can’t perform that action at this time.
0 commit comments