Skip to content

Commit 8654282

Browse files
committed
fix 28239-swift-declcontext-lookupqualified.swift, module lookup can be done
without access control now by diagnostics.
1 parent b5694e9 commit 8654282

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

lib/AST/NameLookup.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,9 +1091,6 @@ bool DeclContext::lookupQualified(Type type,
10911091

10921092
// Look for module references.
10931093
if (auto moduleTy = type->getAs<ModuleType>()) {
1094-
assert(!(options & NL_IgnoreAccessibility) &&
1095-
"accessibility always enforced for module-level lookup");
1096-
10971094
Module *module = moduleTy->getModule();
10981095
auto topLevelScope = getModuleScopeContext();
10991096
if (module == topLevelScope->getParentModule()) {

validation-test/compiler_crashers/28239-swift-declcontext-lookupqualified.swift renamed to validation-test/compiler_crashers_fixed/28239-swift-declcontext-lookupqualified.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
// RUN: not --crash %target-swift-frontend %s -parse
2-
// REQUIRES: asserts
1+
// RUN: not %target-swift-frontend %s -parse
32

43
// Distributed under the terms of the MIT license
54
// Test case submitted to project by https://github.com/practicalswift (practicalswift)

0 commit comments

Comments
 (0)