File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -277,8 +277,11 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
277277 *
278278 * import owner.feature
279279 *
280- * (the feature may be bunched with others, or renamed, but wildcard imports
281- * don't count).
280+ * and there is no visible nested import that excludes the feature, as in
281+ *
282+ * import owner.{ feature => _ }
283+ *
284+ * The feature may be bunched with others, or renamed, but wildcard imports don't count.
282285 *
283286 * 2. The feature is enabled by a compiler option
284287 *
@@ -296,8 +299,8 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
296299 if (ctx.importInfo eq null ) false
297300 else {
298301 val isImportOwner = ctx.importInfo.site.widen.typeSymbol eq owner
299- if (isImportOwner && ctx.importInfo.excluded .contains(feature)) false
300- else if (isImportOwner && ctx.importInfo.originals .contains(feature)) true
302+ if (isImportOwner && ctx.importInfo.originals .contains(feature)) true
303+ else if (isImportOwner && ctx.importInfo.excluded .contains(feature)) false
301304 else {
302305 var c = ctx.outer
303306 while (c.importInfo eq ctx.importInfo) c = c.outer
You can’t perform that action at this time.
0 commit comments