diff --git a/include/swift/Basic/Features.def b/include/swift/Basic/Features.def index cde4ceaeb27bb..a497f6ff8ffa3 100644 --- a/include/swift/Basic/Features.def +++ b/include/swift/Basic/Features.def @@ -105,6 +105,7 @@ UPCOMING_FEATURE(ConciseMagicFile, 274, 6) UPCOMING_FEATURE(ForwardTrailingClosures, 286, 6) UPCOMING_FEATURE(BareSlashRegexLiterals, 354, 6) UPCOMING_FEATURE(ExistentialAny, 335, 6) +UPCOMING_FEATURE(ImportObjcForwardDeclarations, 384, 6) EXPERIMENTAL_FEATURE(StaticAssert, false) EXPERIMENTAL_FEATURE(VariadicGenerics, false) diff --git a/include/swift/Option/FrontendOptions.td b/include/swift/Option/FrontendOptions.td index e44c7921eb53a..0f2713531c53e 100644 --- a/include/swift/Option/FrontendOptions.td +++ b/include/swift/Option/FrontendOptions.td @@ -308,10 +308,6 @@ def enable_experimental_eager_clang_module_diagnostics : Flag<["-"], "enable-experimental-eager-clang-module-diagnostics">, HelpText<"Enable experimental eager diagnostics reporting on the importability of all referenced C, C++, and Objective-C libraries">; -def enable_import_objc_forward_declarations : - Flag<["-"], "enable-import-objc-forward-declarations">, - HelpText<"Attempt to import Objective-C forward declarations">; - def enable_experimental_pairwise_build_block : Flag<["-"], "enable-experimental-pairwise-build-block">, HelpText<"Enable experimental pairwise 'buildBlock' for result builders">; diff --git a/lib/AST/ASTPrinter.cpp b/lib/AST/ASTPrinter.cpp index 3d4434d11dffe..d6e22265217b9 100644 --- a/lib/AST/ASTPrinter.cpp +++ b/lib/AST/ASTPrinter.cpp @@ -3143,6 +3143,24 @@ static bool usesFeatureExistentialAny(Decl *decl) { return false; } +static bool usesFeatureImportObjcForwardDeclarations(Decl *decl) { + ClangNode clangNode = decl->getClangNode(); + if (!clangNode) + return false; + + const clang::Decl *clangDecl = clangNode.getAsDecl(); + if (!clangDecl) + return false; + + if (auto objCInterfaceDecl = dyn_cast(clangDecl)) + return !objCInterfaceDecl->hasDefinition(); + + if (auto objCProtocolDecl = dyn_cast(clangDecl)) + return !objCProtocolDecl->hasDefinition(); + + return false; +} + static bool usesFeatureImplicitSome(Decl *decl) { return false; } diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 0f5cc08dcb4a1..8fd66c4ed696a 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -1352,8 +1352,7 @@ static bool ParseClangImporterArgs(ClangImporterOptions &Opts, // type seems to be NoneAction. if (FrontendOpts.RequestedAction != FrontendOptions::ActionType::REPL && FrontendOpts.RequestedAction != FrontendOptions::ActionType::NoneAction && - (Args.hasArg(OPT_enable_import_objc_forward_declarations) || - LangOpts.isSwiftVersionAtLeast(6))) { + LangOpts.hasFeature(Feature::ImportObjcForwardDeclarations)) { Opts.ImportForwardDeclarations = true; } diff --git a/test/ClangImporter/incomplete_objc_types_availability.swift b/test/ClangImporter/incomplete_objc_types_availability.swift index a411716dc3caa..4b418f00798cf 100644 --- a/test/ClangImporter/incomplete_objc_types_availability.swift +++ b/test/ClangImporter/incomplete_objc_types_availability.swift @@ -2,7 +2,7 @@ // RUN: %target-clang %S/Inputs/custom-modules/IncompleteTypes/incomplete-type-library-1.m -c -o %t/incomplete-type-library-1.o // RUN: %target-clang %S/Inputs/custom-modules/IncompleteTypes/complete-types.m -c -o %t/complete-types.o -// RUN: %target-build-swift -Xfrontend -enable-import-objc-forward-declarations -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-type-library-1.o %t/complete-types.o -Xlinker -framework -Xlinker Foundation -o %t/a.out +// RUN: %target-build-swift -Xfrontend -enable-upcoming-feature -Xfrontend ImportObjcForwardDeclarations -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-type-library-1.o %t/complete-types.o -Xlinker -framework -Xlinker Foundation -o %t/a.out // RUN: %target-run %t/a.out // RUN: %target-build-swift -swift-version 6 -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-type-library-1.o %t/complete-types.o -Xlinker -framework -Xlinker Foundation -o %t/a.out diff --git a/test/ClangImporter/incomplete_objc_types_base_interface.swift b/test/ClangImporter/incomplete_objc_types_base_interface.swift index c1e1890adc602..95c22b96ed9ec 100644 --- a/test/ClangImporter/incomplete_objc_types_base_interface.swift +++ b/test/ClangImporter/incomplete_objc_types_base_interface.swift @@ -2,7 +2,7 @@ // RUN: %target-clang %S/Inputs/custom-modules/IncompleteTypes/incomplete-type-library-1.m -c -o %t/incomplete-type-library-1.o // RUN: %target-clang %S/Inputs/custom-modules/IncompleteTypes/complete-types.m -c -o %t/complete-types.o -// RUN: %target-build-swift -Xfrontend -enable-import-objc-forward-declarations -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-type-library-1.o %t/complete-types.o -Xlinker -framework -Xlinker Foundation -o %t/a.out +// RUN: %target-build-swift -Xfrontend -enable-upcoming-feature -Xfrontend ImportObjcForwardDeclarations -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-type-library-1.o %t/complete-types.o -Xlinker -framework -Xlinker Foundation -o %t/a.out // RUN: %target-run %t/a.out // REQUIRES: objc_interop diff --git a/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete.swift b/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete.swift index e8ab8fc12054d..da10b11c54442 100644 --- a/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete.swift +++ b/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete.swift @@ -3,7 +3,7 @@ // RUN: %target-clang %S/Inputs/custom-modules/IncompleteTypes/incomplete-type-library-2.m -c -o %t/incomplete-type-library-2.o // RUN: %target-clang %S/Inputs/custom-modules/IncompleteTypes/complete-types.m -c -o %t/complete-types.o -// RUN: %target-build-swift -Xfrontend -enable-import-objc-forward-declarations -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-type-library-1.o %t/incomplete-type-library-2.o %t/complete-types.o -Xlinker -framework -Xlinker Foundation -o %t/a.out +// RUN: %target-build-swift -Xfrontend -enable-upcoming-feature -Xfrontend ImportObjcForwardDeclarations -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-type-library-1.o %t/incomplete-type-library-2.o %t/complete-types.o -Xlinker -framework -Xlinker Foundation -o %t/a.out // RUN: %target-run %t/a.out // RUN: %target-build-swift -swift-version 6 -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-type-library-1.o %t/incomplete-type-library-2.o %t/complete-types.o -Xlinker -framework -Xlinker Foundation -o %t/a.out diff --git a/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_clang_definition.swift b/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_clang_definition.swift index dd74416217dfa..bbd8c7fdb44b8 100644 --- a/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_clang_definition.swift +++ b/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_clang_definition.swift @@ -4,7 +4,7 @@ // RUN: %target-clang %S/Inputs/custom-modules/IncompleteTypes/incomplete-type-library-1.m -c -o %t/incomplete-type-library-1.o // RUN: %target-clang %S/Inputs/custom-modules/IncompleteTypes/complete-types.m -c -o %t/complete-types.o -// RUN: %target-build-swift -Xfrontend -enable-import-objc-forward-declarations -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %t/full_definition.swift %t/incomplete_definition.swift %t/incomplete-type-library-1.o %t/complete-types.o -Xlinker -framework -Xlinker Foundation -o %t/a.out +// RUN: %target-build-swift -Xfrontend -enable-upcoming-feature -Xfrontend ImportObjcForwardDeclarations -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %t/full_definition.swift %t/incomplete_definition.swift %t/incomplete-type-library-1.o %t/complete-types.o -Xlinker -framework -Xlinker Foundation -o %t/a.out // RUN: %target-run %t/a.out // REQUIRES: executable_test diff --git a/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_swift_definition.swift b/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_swift_definition.swift index 5c65fc8666184..2ca6056aac886 100644 --- a/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_swift_definition.swift +++ b/test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_swift_definition.swift @@ -2,7 +2,7 @@ // RUN: split-file %s %t // RUN: %target-build-swift -module-name CompleteSwiftTypes -parse-as-library %S/Inputs/custom-modules/IncompleteTypes/complete-swift-types.swift -emit-module -emit-module-path %t/CompleteSwiftTypes.swiftmodule -// RUN: not %target-swift-frontend -enable-import-objc-forward-declarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %t/incomplete_definition.swift %t/full_definition.swift 2>&1 | %FileCheck %s +// RUN: not %target-swift-frontend -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %t/incomplete_definition.swift %t/full_definition.swift 2>&1 | %FileCheck %s // REQUIRES: objc_interop diff --git a/test/ClangImporter/incomplete_objc_types_compatibility_incomplete_incomplete.swift b/test/ClangImporter/incomplete_objc_types_compatibility_incomplete_incomplete.swift index ba10819287ca3..8764e7f345d05 100644 --- a/test/ClangImporter/incomplete_objc_types_compatibility_incomplete_incomplete.swift +++ b/test/ClangImporter/incomplete_objc_types_compatibility_incomplete_incomplete.swift @@ -3,7 +3,7 @@ // RUN: %target-clang %S/Inputs/custom-modules/IncompleteTypes/incomplete-type-library-2.m -c -o %t/incomplete-type-library-2.o // RUN: %target-clang %S/Inputs/custom-modules/IncompleteTypes/complete-types.m -c -o %t/complete-types.o -// RUN: %target-build-swift -Xfrontend -enable-import-objc-forward-declarations -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-type-library-1.o %t/incomplete-type-library-2.o %t/complete-types.o -Xlinker -framework -Xlinker Foundation -o %t/a.out +// RUN: %target-build-swift -Xfrontend -enable-upcoming-feature -Xfrontend ImportObjcForwardDeclarations -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-type-library-1.o %t/incomplete-type-library-2.o %t/complete-types.o -Xlinker -framework -Xlinker Foundation -o %t/a.out // RUN: %target-run %t/a.out // RUN: %target-build-swift -swift-version 6 -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-type-library-1.o %t/incomplete-type-library-2.o %t/complete-types.o -Xlinker -framework -Xlinker Foundation -o %t/a.out diff --git a/test/ClangImporter/incomplete_objc_types_full_availability.swift b/test/ClangImporter/incomplete_objc_types_full_availability.swift index 76c59ee21804a..93bc42d217b1b 100644 --- a/test/ClangImporter/incomplete_objc_types_full_availability.swift +++ b/test/ClangImporter/incomplete_objc_types_full_availability.swift @@ -2,7 +2,7 @@ // RUN: %target-clang %S/Inputs/custom-modules/IncompleteTypes/incomplete-type-library-1.m -c -o %t/incomplete-type-library-1.o // RUN: %target-clang %S/Inputs/custom-modules/IncompleteTypes/complete-types.m -c -o %t/complete-types.o -// RUN: %target-build-swift -Xfrontend -enable-import-objc-forward-declarations -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-type-library-1.o %t/complete-types.o -Xlinker -framework -Xlinker Foundation -o %t/a.out +// RUN: %target-build-swift -Xfrontend -enable-upcoming-feature -Xfrontend ImportObjCForwardDeclarations -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-type-library-1.o %t/complete-types.o -Xlinker -framework -Xlinker Foundation -o %t/a.out // RUN: %target-run %t/a.out // REQUIRES: objc_interop diff --git a/test/ClangImporter/incomplete_objc_types_importing_limitations_diagnostics.swift b/test/ClangImporter/incomplete_objc_types_importing_limitations_diagnostics.swift index 055ce2ed12507..93b8910e554d8 100644 --- a/test/ClangImporter/incomplete_objc_types_importing_limitations_diagnostics.swift +++ b/test/ClangImporter/incomplete_objc_types_importing_limitations_diagnostics.swift @@ -1,4 +1,4 @@ -// RUN: not %target-swift-frontend -enable-import-objc-forward-declarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes %s 2>&1 | %FileCheck %s +// RUN: not %target-swift-frontend -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes %s 2>&1 | %FileCheck %s // RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes %s 2>&1 | %FileCheck %s // REQUIRES: objc_interop diff --git a/test/ClangImporter/incomplete_objc_types_no_reference.swift b/test/ClangImporter/incomplete_objc_types_no_reference.swift index 353a0b8010c25..a4ef0c7bb4e30 100644 --- a/test/ClangImporter/incomplete_objc_types_no_reference.swift +++ b/test/ClangImporter/incomplete_objc_types_no_reference.swift @@ -1,4 +1,4 @@ -// RUN: not %target-swift-frontend -enable-import-objc-forward-declarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes %s 2>&1 | %FileCheck %s +// RUN: not %target-swift-frontend -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes %s 2>&1 | %FileCheck %s // RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes %s 2>&1 | %FileCheck %s // REQUIRES: objc_interop diff --git a/test/ClangImporter/incomplete_objc_types_no_root_protocol.swift b/test/ClangImporter/incomplete_objc_types_no_root_protocol.swift index 351760d420be4..3edfce511deb1 100644 --- a/test/ClangImporter/incomplete_objc_types_no_root_protocol.swift +++ b/test/ClangImporter/incomplete_objc_types_no_root_protocol.swift @@ -1,7 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-clang %S/Inputs/custom-modules/IncompleteTypes/incomplete-noroottype-protocol-library.m -c -o %t/incomplete-noroottype-protocol-library.o -// RUN: %target-build-swift -Xfrontend -enable-import-objc-forward-declarations -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-noroottype-protocol-library.o -Xlinker -framework -Xlinker Foundation -o %t/a.out +// RUN: %target-build-swift -Xfrontend -enable-upcoming-feature -Xfrontend ImportObjcForwardDeclarations -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-noroottype-protocol-library.o -Xlinker -framework -Xlinker Foundation -o %t/a.out // RUN: %target-run %t/a.out // RUN: %target-build-swift -swift-version 6 -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-noroottype-protocol-library.o -Xlinker -framework -Xlinker Foundation -o %t/a.out diff --git a/test/ClangImporter/incomplete_objc_types_nsproxy.swift b/test/ClangImporter/incomplete_objc_types_nsproxy.swift index 5163626e34ed8..7c2a5acc543bd 100644 --- a/test/ClangImporter/incomplete_objc_types_nsproxy.swift +++ b/test/ClangImporter/incomplete_objc_types_nsproxy.swift @@ -1,7 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-clang %S/Inputs/custom-modules/IncompleteTypes/incomplete-nsproxy-library.m -c -o %t/incomplete-nsproxy-library.o -// RUN: %target-build-swift -Xfrontend -enable-import-objc-forward-declarations -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-nsproxy-library.o -Xlinker -framework -Xlinker Foundation -o %t/a.out +// RUN: %target-build-swift -Xfrontend -enable-upcoming-feature -Xfrontend ImportObjcForwardDeclarations -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-nsproxy-library.o -Xlinker -framework -Xlinker Foundation -o %t/a.out // RUN: %target-run %t/a.out // RUN: %target-build-swift -swift-version 6 -Xfrontend -enable-objc-interop -I %S/Inputs/custom-modules/IncompleteTypes %s %t/incomplete-nsproxy-library.o -Xlinker -framework -Xlinker Foundation -o %t/a.out diff --git a/test/ClangImporter/incomplete_objc_types_swift_definition_imported.swift b/test/ClangImporter/incomplete_objc_types_swift_definition_imported.swift index 4ac88c926fa95..4242fd7d8cb1d 100644 --- a/test/ClangImporter/incomplete_objc_types_swift_definition_imported.swift +++ b/test/ClangImporter/incomplete_objc_types_swift_definition_imported.swift @@ -1,6 +1,6 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -parse-as-library %S/Inputs/custom-modules/IncompleteTypes/complete-swift-types.swift -module-name CompleteSwiftTypes -emit-module -emit-module-path %t/CompleteSwiftTypes.swiftmodule -// RUN: not %target-swift-frontend -enable-import-objc-forward-declarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s 2>&1 | %FileCheck %s +// RUN: not %target-swift-frontend -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s 2>&1 | %FileCheck %s // RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s 2>&1 | %FileCheck %s // REQUIRES: objc_interop diff --git a/test/ClangImporter/incomplete_objc_types_swift_definition_imported_implementationOnly.swift b/test/ClangImporter/incomplete_objc_types_swift_definition_imported_implementationOnly.swift index 65a5fdb1155cd..0cd9a775bd6ad 100644 --- a/test/ClangImporter/incomplete_objc_types_swift_definition_imported_implementationOnly.swift +++ b/test/ClangImporter/incomplete_objc_types_swift_definition_imported_implementationOnly.swift @@ -1,6 +1,6 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -parse-as-library %S/Inputs/custom-modules/IncompleteTypes/complete-swift-types.swift -module-name CompleteSwiftTypes -emit-module -emit-module-path %t/CompleteSwiftTypes.swiftmodule -// RUN: not %target-swift-frontend -enable-import-objc-forward-declarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s 2>&1 | %FileCheck %s +// RUN: not %target-swift-frontend -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s 2>&1 | %FileCheck %s // RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s 2>&1 | %FileCheck %s // REQUIRES: objc_interop diff --git a/test/ClangImporter/incomplete_objc_types_swift_definition_imported_name_conflict.swift b/test/ClangImporter/incomplete_objc_types_swift_definition_imported_name_conflict.swift index 73eab3bea4a32..720cf034f60d5 100644 --- a/test/ClangImporter/incomplete_objc_types_swift_definition_imported_name_conflict.swift +++ b/test/ClangImporter/incomplete_objc_types_swift_definition_imported_name_conflict.swift @@ -1,6 +1,6 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -parse-as-library %S/Inputs/custom-modules/IncompleteTypes/complete-swift-types.swift -module-name CompleteSwiftTypes -emit-module -emit-module-path %t/CompleteSwiftTypes.swiftmodule -// RUN: not %target-swift-frontend -enable-import-objc-forward-declarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s 2>&1 | %FileCheck %s +// RUN: not %target-swift-frontend -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s 2>&1 | %FileCheck %s // RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s 2>&1 | %FileCheck %s // REQUIRES: objc_interop diff --git a/test/ClangImporter/incomplete_objc_types_swift_definition_imported_shadow_type_mismatch.swift b/test/ClangImporter/incomplete_objc_types_swift_definition_imported_shadow_type_mismatch.swift index 488790f63de6e..40a2597055c71 100644 --- a/test/ClangImporter/incomplete_objc_types_swift_definition_imported_shadow_type_mismatch.swift +++ b/test/ClangImporter/incomplete_objc_types_swift_definition_imported_shadow_type_mismatch.swift @@ -1,7 +1,7 @@ // RUN: %empty-directory(%t) // RUN: %target-build-swift -parse-as-library %S/Inputs/custom-modules/IncompleteTypes/complete-swift-types.swift -emit-module -emit-module-path %t/CompleteSwiftTypes.swiftmodule -emit-objc-header -emit-objc-header-path %t/CompleteSwiftTypes-Swift.h -emit-library -o %t/libCompleteSwiftTypes.dylib // RUN: %target-clang -framework Foundation -dynamiclib %S/Inputs/custom-modules/IncompleteTypes/objc-library-forward-declaring-complete-swift-types.m -I %t -L %t -lCompleteSwiftTypes -o %t/libObjCLibraryForwardDeclaringCompleteSwiftTypes.dylib -// RUN: %target-build-swift -Xfrontend -enable-import-objc-forward-declarations -Xfrontend -enable-objc-interop %s -I %S/Inputs/custom-modules/IncompleteTypes -I %t -L %t -lCompleteSwiftTypes -lObjCLibraryForwardDeclaringCompleteSwiftTypes -o %t/a.out +// RUN: %target-build-swift -Xfrontend -enable-upcoming-feature -Xfrontend ImportObjcForwardDeclarations -Xfrontend -enable-objc-interop %s -I %S/Inputs/custom-modules/IncompleteTypes -I %t -L %t -lCompleteSwiftTypes -lObjCLibraryForwardDeclaringCompleteSwiftTypes -o %t/a.out // RUN: %target-run %t/a.out // REQUIRES: objc_interop