Skip to content

Commit bd29a6f

Browse files
committed
Add experimental feature for module selector
1 parent df32362 commit bd29a6f

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

include/swift/Basic/Features.def

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,9 @@ EXPERIMENTAL_FEATURE(CDecl, false)
510510
/// Allow use of `@extensible` on public enums
511511
SUPPRESSIBLE_EXPERIMENTAL_FEATURE(ExtensibleAttribute, false)
512512

513+
/// Allow use of `Module::name` syntax
514+
EXPERIMENTAL_FEATURE(ModuleSelector, false)
515+
513516
#undef EXPERIMENTAL_FEATURE_EXCLUDED_FROM_MODULE_INTERFACE
514517
#undef EXPERIMENTAL_FEATURE
515518
#undef UPCOMING_FEATURE

lib/AST/FeatureSet.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ UNINTERESTING_FEATURE(MacrosOnImports)
126126
UNINTERESTING_FEATURE(NonisolatedNonsendingByDefault)
127127
UNINTERESTING_FEATURE(KeyPathWithMethodMembers)
128128

129+
// TODO: Return true for inlinable function bodies with module selectors in them
130+
UNINTERESTING_FEATURE(ModuleSelector)
131+
129132
static bool usesFeatureNonescapableTypes(Decl *decl) {
130133
auto containsNonEscapable =
131134
[](SmallVectorImpl<InverseRequirement> &inverseReqs) {

test/NameLookup/module_selector.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// RUN: %target-typecheck-verify-swift -enable-experimental-feature ModuleSelector
2+
3+
// REQUIRES: swift_feature_ModuleSelector

0 commit comments

Comments
 (0)