Skip to content

Commit c3a61be

Browse files
committed
Add experimental feature for module selector
1 parent 749e9ee commit c3a61be

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
@@ -508,6 +508,9 @@ EXPERIMENTAL_FEATURE(CDecl, false)
508508
/// Allow use of `@extensible` on public enums
509509
SUPPRESSIBLE_EXPERIMENTAL_FEATURE(ExtensibleAttribute, false)
510510

511+
/// Allow use of `Module::name` syntax
512+
EXPERIMENTAL_FEATURE(ModuleSelector, false)
513+
511514
#undef EXPERIMENTAL_FEATURE_EXCLUDED_FROM_MODULE_INTERFACE
512515
#undef EXPERIMENTAL_FEATURE
513516
#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)