Skip to content

Commit 4b7c020

Browse files
authored
Merge pull request swiftlang#68711 from kavon/warn-about-experimental-features-noassert
fix `-typecheck -verify` and experimental features
2 parents 96d16b1 + a238d3e commit 4b7c020

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

include/swift/AST/DiagnosticsFrontend.def

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ ERROR(error_unsupported_target_os, none,
3636
ERROR(error_unsupported_target_arch, none,
3737
"unsupported target architecture: '%0'", (StringRef))
3838

39-
ERROR(error_experimental_feature_not_available, none,
40-
"experimental feature '%0' cannot be enabled in a production compiler",
41-
(StringRef))
42-
4339
ERROR(error_upcoming_feature_on_by_default, none,
4440
"upcoming feature '%0' is already enabled as of Swift version %1",
4541
(StringRef, unsigned))

lib/Frontend/CompilerInvocation.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -812,9 +812,9 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
812812
if (auto feature = getExperimentalFeature(value)) {
813813
#ifdef NDEBUG
814814
if (!isFeatureAvailableInProduction(*feature)) {
815-
Diags.diagnose(SourceLoc(),
816-
diag::error_experimental_feature_not_available,
817-
A->getValue());
815+
llvm::errs() << "error: experimental feature '" << A->getValue()
816+
<< "' cannot be enabled in a production compiler\n";
817+
exit(1);
818818
}
819819
#endif
820820

0 commit comments

Comments
 (0)